Re: Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards) - Mailing list pgsql-general

From Tom Lane
Subject Re: Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards)
Date
Msg-id 22664.1227033709@sss.pgh.pa.us
Whole thread Raw
In response to Re: Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards)  ("DANG Trieu" <tdang@miranda.com>)
List pgsql-general
"DANG Trieu" <tdang@miranda.com> writes:
> On the "abstract" table (event):
> gsmlog3_30=# explain analyze select * from event where timestamp >
> 1226952050683 order by timestamp desc limit 10;

Turning on constraint exclusion might help here, if you have appropriate
check constraints for the range of timestamp attached to all the tables.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: No serial type
Next
From: Tom Lane
Date:
Subject: Re: MVCC and index-only read