on 04-06-2020 4:09 PM
Could you please let me know is there difference between Group by V/S Distinct from performance point of view ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. GROUP BY and DISTINCT both generate the same query execution plan when no aggregates are used.
2. GROUP BY becomes important when aggregates are used. DISTINCT is just for filtering out duplicate records from query result sets.
Based on my understanding, GROUP BY is good during complex scenario compared to DISTINCT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.