Archives of the TeradataForum
Message Posted: Mon, 16 Sep 2002 @ 06:17:35 GMT
This is an offshoot of my previous question on topic 'all in all'.
explain select * from table1 where UPI_COL = value OR 4 = 5 ;
The explain shows a FTS.
The predicate '4 = 5' is obviously FALSE, and the above query can be rewritten without it. Then, the optimizer efficiently uses the UPI.
Why cannot the optimizer make such preliminary evaluations and transform the query? Do other RDBMS optimizers take any such steps?
Just in case you are wondering who would code such SQL, please see previous topic 'all in all'.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|