| От | Thomas Pundt |
|---|---|
| Тема | Re: Group by more efficient than distinct? |
| Дата | |
| Msg-id | 200804181025.04277.mlists@rp-online.de обсуждение |
| Ответ на | Group by more efficient than distinct? (Francisco Reyes <lists@stringsutils.com>) |
| Список | pgsql-performance |
On Freitag, 18. April 2008, Francisco Reyes wrote: | I am trying to get a distinct set of rows from 2 tables. | After looking at someone else's query I noticed they were doing a group by | to obtain the unique list. | | After comparing on multiple machines with several tables, it seems using | group by to obtain a distinct list is substantially faster than using | select distinct. | | Is there any dissadvantage of using "group by" to obtain a unique list? Searching the archives suggests that the code related to "group by" is much newer than the one related to "distinct" and thus might benefit from more optimization paths. Ciao, Thomas -- Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера