tags:

views:

29

answers:

1

Hi, I need to execute an SQL query. If i have a query with multiple tables in From clause with Join condition in Where clause, And i have Group by statement, Should i perform Join operation first followed by Group By ? OR should i perform Group By first then Join ? Which one would be better ?

Note: In my environment, whichever operator that filters out more tuples should be executed first for better performance and less usage of memory for overall query execution.

+1  A: 

Use DB's EXPLAIN syntax, You'll see witch of this two methods (in Yours specific environment) will cause more DB operations taken to produce output

canni
I used like Explain Select * from TestI am unable to understand the Output of this query.Is there any good link to understand it ?
bjskishore123