Hi,
Can someone please let me know if there are any benefits using Select Distinct vs. Group By in performance factor? According to my knowledge both are used to perform same task.
Hi,
Can someone please let me know if there are any benefits using Select Distinct vs. Group By in performance factor? According to my knowledge both are used to perform same task.
According to development version of PostgreSQL,
select DISTINCT is performed using the similar logic as GROUP BY,since the logic of GROUP BY leads to performance improvement over the code that was used.
I dont think there is any performance different between the two. But I would think that DISTINCT is better. I suspect it's faster, but i have nothing to show for it
Well in case of Ms Access at least the query results are not the same.
You can compare it yourself:
1. describe select distinct column_name from db.table_name
2. describe select column_name from db.table_name group by column_name
The second query will give you more detail results using sorting.
Bookmarks