Re: Index Scans become Seq Scans after VACUUM ANALYSE

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: mlw <markw@mohawksoft.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Andrew Sullivan <andrew@libertyrms.info>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2002-04-18T15:43:11Z
Lists: pgsql-hackers
mlw <markw@mohawksoft.com> writes:
> My one most important experience (I've had more than one) with this
> whole topic is DMN's music database, when PostgreSQL uses the index,
> the query executes in a fraction of a second. When
> "enable_seqscan=true" PostgreSQL refuses to use the index, and the
> query takes a about a minute. No matter how much I analyze, I have to
> disable sequential scan for the system to work correctly.

It would be useful to see "explain analyze" not just "explain" for these
cases.  Also, what stats does pg_stats show for the variables used?

			regards, tom lane