From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Alex Stapleton <alexs(at)advfn(dot)com> |
Cc: | Hegyvari Krisztian <hegyvari(dot)krisztian(at)ardents(dot)hu>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Select Last n Rows Matching an Index Condition (and caches) |
Date: | 2005-03-18 20:05:45 |
Message-ID: | 20050318200545.GB22563@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-18 21:42:32 | Re: pg_dump large-file support > 16GB |
Previous Message | Dianne Yumul | 2005-03-18 20:01:06 | Re: Install error at rpm package + Fedora Core3 |