Search Postgresql Archives

Re: Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Already done in 8.1.  Here's an excerpt from the Release Notes:
>
> Automatically use indexes for MIN() and MAX() (Tom)
>
>     In previous releases, the only way to use an index for MIN()
>     or MAX() was to rewrite the query as SELECT col FROM tab ORDER
>     BY col LIMIT 1.  Index usage now happens automatically.
>

Which query form will generally be faster in 8.1 (or will they be
exactly the same)?

BJ


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux