abhayasahoo Beginner
Joined: 04 Dec 2002 Posts: 8 Topics: 6
|
Posted: Mon Nov 21, 2005 3:33 pm Post subject: Order of predicates in an SQL query |
|
|
Does order of predicates in an SQL query with a JOIN matter as far as the performance of the query is concerned ?
For example,
SQL1
Select A.col1, A.col2, B.col3
from TBL1 A
,TBL1 B
where A.col6 = B.col6 >>>> This is the join condition
and A.col4 = '7777779' and
A.col5 = 0 and
B.col4 = 'ABC';
SQL2
Select A.col1, A.col2, B.col3
from TBL1 A
,TBL1 B
where A.col4 = '7777779' and
A.col5 = 0 and
B.col4 = 'ABC' and
A.col6 = B.col6 >>>> This is the join condition
Which of the SQLs will be faster with DB2 V7 (and later versions) or both will have the same performance ? |
|