Carlos Moreno skrev:
> When I force it via "set enable_seqscan to off", the index scan
> takes about 0.1 msec (as reported by explain analyze), whereas
> For the time being, I'm using an explicit "enable_seqscan off"
> in the client code, before executing the select. But I wonder:
> Is this still an issue, or has it been solved in the latest
For most queries it has never been an issue. Every once in a while there
is a query that the planner makes a non-optimal plan for, but it's not
In general the optimizer has improved with every new version of pg.
Almost everyone I've talked to that has upgraded has got a faster
database tham before. It was like that for 7.4->8.0, for 8.0->8.1 and
for 8.1->8.2. So in your case going from 7.4->8.2 is most likely going
to give a speedup (especially if you have some queries that isn't just
simple primary key lookups).
In your case it's hard to give any advice since you didn't share the
EXPLAIN ANALYZE output with us. I'm pretty sure it's possible to tune pg
so it makes the right choice even for this query of yours but without
the EXPLAIN ANALYZE output we would just be guessing anyway. If you want
to share it then it might be helpful to show the plan both with and
without seqscan enabled.
How often do you run VACUUM ANALYZE; on the database?
In response to
pgsql-performance by date
|Next:||From: Russell Smith||Date: 2007-01-27 07:35:23|
|Subject: Re: Seqscan/Indexscan still a known issue?|
|Previous:||From: Carlos Moreno||Date: 2007-01-27 02:18:42|
|Subject: Seqscan/Indexscan still a known issue?|