Which is efficient?


Re: Which is efficient?

and spool will remain same also?  in TD14.

Teradata Employee

Re: Which is efficient?

Spool will remain the same, execution cost after the initial table reads will be the same. Overall performance of the query will not be the same because the underlying table has to be read in order to extract the columns desired - making the wider tables cost more to read initially. But after the base tables have been read, all the non-participating columns will be eliminated and the rest of the work of the query will be very similar or identical.

Note that if this is a common pattern, Columnar partitioning of the table may be a good choice. Columnar partitioning makes the reading of the small number of columns from a wide table more efficient by only reading the columns required by the query.