Home » RDBMS Server » Performance Tuning » Order of tables in the query..
Order of tables in the query.. [message #366057] Mon, 23 October 2000 07:00 Go to next message
guruprasad
Messages: 6
Registered: October 2000
Junior Member
When we write a query based on multiple tables, generally what is the thumb rule for the order in which the tables names should appear for better performance. For eg:

select a, b,..... from tablea, tableb, tablec....
where ....

what should be the order of the tables after from clause. The table that has least rows should be at the last or first ? please let me know

Thanks,
Guru
Re: Order of tables in the query.. [message #366061 is a reply to message #366057] Tue, 24 October 2000 12:17 Go to previous messageGo to next message
Andrew
Messages: 144
Registered: March 1999
Senior Member
Guru
You are right, generally from the tale with the least rows first. Also, your where clause should have the most selective criteria first.
Re: Order of tables in the query.. [message #366064 is a reply to message #366057] Wed, 25 October 2000 04:27 Go to previous message
shripad
Messages: 1
Registered: October 2000
Junior Member
Driving table shold be last one in from clause (Driving table is the one which has most number of constranints)
Previous Topic: Does the order of tables in the FROM clause affect the outcome of a query?
Next Topic: not able to take online backup
Goto Forum:
  


Current Time: Thu Sep 24 17:05:43 CDT 2020