Page 1 of 1

Reading View

Posted: Mon Apr 23, 2007 5:37 pm
by saugat_1982
Can Datastage 7.5.2 read views from Source tables?

Posted: Mon Apr 23, 2007 6:31 pm
by ray.wurlod
Yes. But the cost of materializing the view may be one that you wish to avoid.

Posted: Mon Apr 23, 2007 6:34 pm
by saugat_1982
ray.wurlod wrote:Yes. But the cost of materializing the view may be one that you wish to avoid. ...

Please tell me why Cost will be high?

Posted: Mon Apr 23, 2007 7:52 pm
by ray.wurlod
Imagine that the SELECT statement that defines the view selects 10 million rows, and when you select from the view you want only 10,000 of these.

Selecting from the view means that the first, large, SELECT has to occur to materialize the view, and only then can your second, small, SELECT proceed.

If you had selected the 10,000 rows from the base table, only the small SELECT would need to be executed.

Posted: Mon Apr 23, 2007 11:37 pm
by saugat_1982
ray.wurlod wrote:Imagine that the SELECT statement that defines the view selects 10 million rows, and when you select from the view you want only 10,000 of these.

Selecting from the view means that the first, large ...

Thanks Ray ......the info is really informative

Posted: Tue Apr 24, 2007 12:21 am
by ray.wurlod
Can you mark this thread as resolved, then?