Re: Indexes not always used after inserts/updates/vacuum analyze

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Reinhard Max <max@suse.de>
Cc: "Michael G. Martin" <michael@vpmonline.com>, pgsql-bugs@postgresql.org
Date: 2002-02-28T14:51:06Z
Lists: pgsql-bugs
Reinhard Max <max@suse.de> writes:
> I've just found a case where forcing indexscans results in much higher
> speed.

>         ->  Index Scan using foo_pkey on foo
> 		(cost=0.00..25153.18 rows=352072 width=4)
> 		(actual time=0.03..157.57 rows=38432 loops=1)

The major estimation error is evidently in this indexscan.  What
statistics does pg_stats show for this table?

			regards, tom lane