I having a query with 10 tables joined.
Do i need to follow any order in writing the sql joins?
Suppose if table-1 has 1000 records, table-2 has 900 records and so on
So do i need to write the join for the table has higher number of records and followed by lower number of records? so that we improve the performance of sql.
No*. That’s not been necessary since Oracle version 6 which had a rule based optimiser (RBO).
(* unless you’re getting into advanced tuning topics and need to use hints, as other answers have pointed out and expanded on)
Oracle 7 onwards has a cost based optimiser (CBO) which uses statistics to calculate what it believes will be the most efficient manner to execute the query.
Support for the RBO has been removed from 10g onwards
See: http://www.dba-oracle.com/oracle_tips_10g_cbo.htm