Re: Select Last n Rows Matching an Index Condition (and caches) - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Select Last n Rows Matching an Index Condition (and caches)
Date
Msg-id 20050318200545.GB22563@svana.org
Whole thread Raw
In response to Re: Select Last n Rows Matching an Index Condition (and caches)  ("Alex Stapleton" <alexs@advfn.com>)
List pgsql-general
On Fri, Mar 18, 2005 at 10:23:14AM -0000, Alex Stapleton wrote:
> If I SET ENABLE_SEQSCAN TO OFF it uses the Index, but it does an Index scan
> backward if I do
>
> SELECT * FROM article WHERE symbol=12646 AND source = 19 ORDER BY
> symbol desc, source DESC, time DESC LIMIT 1000;
>
> Which is better but still quite slow.

What's the EXPLAIN ANALYZE of this query? Have you done VACUUM FULL
and/or ANALYZE recently?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Dianne Yumul
Date:
Subject: Re: Install error at rpm package + Fedora Core3
Next
From: Tom Lane
Date:
Subject: Re: pg_dump large-file support > 16GB