By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,851 Members | 1,729 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,851 IT Pros & Developers. It's quick & easy.

sql optimization

P: n/a
SQL: select talble1.c1
from table1,table2
where table1.c2=table2.c2

so if talbe1 has 1000 records,table2 has 100 records

the sql statement :from table1,table2 vs. from table2,table1

which sql will be more good for performance using db2?

Nov 8 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ian
db*******@gmail.com wrote:
SQL: select talble1.c1
from table1,table2
where table1.c2=table2.c2

so if talbe1 has 1000 records,table2 has 100 records

the sql statement :from table1,table2 vs. from table2,table1

which sql will be more good for performance using db2?
It doesn't matter. The query-rewrite portion of the optimizer
will determine the best way (based on the tables' statistics).
If you don't have accurate statistics, the optimizer may make
a poor choice.
Nov 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.