Re: Best way to get the latest revision from a table
От | Nikolas Everett |
---|---|
Тема | Re: Best way to get the latest revision from a table |
Дата | |
Msg-id | AANLkTikgQ8y4=5Ly_x+U0mQ7RRHprPGDd-rR8z1NOPWS@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Best way to get the latest revision from a table ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Ответы |
Re: Best way to get the latest revision from a table
Re: Best way to get the latest revision from a table |
Список | pgsql-performance |
On Fri, Jan 14, 2011 at 7:59 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
> As for speed, either one might be faster in a particularAfter fixing a mistake in my testing and learning from Tom's example
> situation.
I generated queries against the OP's test data which produce
identical results, and I'm finding no significant difference between
run times for the two versions. The OP should definitely try both
against the real tables.
<snip>
-Kevin
After trying both against the real tables DISTINCT ON seems to be about two orders of magnitude faster than the other options.
Thanks so much!
Nik Everett
В списке pgsql-performance по дате отправления: