Search Postgresql Archives

Re: Seeking performance advice: Index for "recent entries"

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

 



Chris Angelico <rosuav@xxxxxxxxx> writes:
> On Wed, May 9, 2012 at 2:52 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> I think this falls under the rubric of "premature optimization is the
>> root of all evil".  Just use a plain index on the timestamptz column
>> and be happy.  Searches that only look at the extremal values of a
>> column work perfectly well with a full index, because they only need to
>> examine a small range of the index.

> The index is actually on two columns, an account ID followed by the
> effective date - I need to look up whether any particular account has
> recent entries. Does that make any difference?

Should still work all right, though you might want to check plans and
timings on some test data to be sure.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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