Archives of the TeradataForum
Message Posted: Sat, 15 Sep 2002 @ 03:34:06 GMT
The plan the optimizer comes up with may depend on the literal value coded in the where clause. e.g.
select * from table_x where nusi_col = 'rare_value' ;
The above query may use a NUSI on column nusi_column as the selectivity for value 'rare_value' is good. On the other hand, for the query
where nusi_col = 'common_value'
the explain plan may show a FTS.
All this makes sense. Now, if I use a macro or BTEQ with using clause, the query without the literal value is in the request parcel, and the literal value is in the data parcel. The optimizer does *not* see the data parcel.
So how did the optimizer do its work without knowing the literal value? Therefore, the plan for the macro may not be the 'most optimal' plan?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|