|
|
Archives of the TeradataForum
Message Posted: Fri, 04 Jun 2004 @ 15:22:31 GMT
Subj: | | Order of predicates |
|
From: | | Martin O Brien |
Hi,
Does the order of predicates matter when coding SQL in Teradata? ( assuming no indexes satisfy the predicates ).
In other databases that I work with placing the most restrictive predicates first is better if you are 'anding' predicates and placing the
least restrictive predicates first is better if you using 'Or'. By coding in this manner, the amount of comparisons is reduced ( and therefore
CPU). Is Teradata's optimiser intelligent enough to re-order predicates no matter which order they are written in?
Thanks,
Martin
| |