Re: Best way to get the latest revision from a table

Поиск
Список
Период
Сортировка
От Shaun Thomas
Тема Re: Best way to get the latest revision from a table
Дата
Msg-id D247E79EFD801E40A9449A9724F6295B4C5F5F4F@spswchi6mail1.peak6.net
обсуждение исходный текст
Ответ на Re: Best way to get the latest revision from a table  (Nikolas Everett <nik9000@gmail.com>)
Список pgsql-performance
> After trying both against the real tables DISTINCT ON seems to be
> about two orders of magnitude faster than the other options.

Glad it worked. It looked at least naively similar to situations I've run into and DISTINCT ON always helped me out.
It'sall the fun of GROUP BY with the ability to discard non-aggregate results just by screwing around with your
sorting.Still one of my favorite tricks. 

--
Shaun Thomas
Peak6 | 141 W. Jackson Blvd. | Suite 800 | Chicago, IL 60604
312-676-8870
sthomas@peak6.com

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

В списке pgsql-performance по дате отправления:

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: Best way to get the latest revision from a table
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: The good, old times