Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael G(dot) Martin" <michael(at)vpmonline(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Indexes not always used after inserts/updates/vacuum analyze
Date: 2002-02-28 05:00:25
Message-ID: 11141.1014872425@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Michael G. Martin" <michael(at)vpmonline(dot)com> writes:
> I just ran a vacuum analyze with the specific column.  Still get the 
> same explain plan:

Did the pg_stats data change noticeably?

ANALYZE is a statistical sampling process in 7.2, so I'd expect the
results to move around somewhat each time you repeat it.  But if it
changes a lot then we have a problem.

You could also try
	
ALTER TABLE symbol_data ALTER symbol_name SET STATISTICS n

for larger values of n (10 is the default) and then re-ANALYZE
to see if the stats get any more accurate.  The default of 10
was more or less picked out of the air ... perhaps it's too small.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Michael G. MartinDate: 2002-02-28 05:20:26
Subject: Re: Indexes not always used after inserts/updates/vacuum analyze
Previous:From: Michael G. MartinDate: 2002-02-28 04:45:37
Subject: Re: Indexes not always used after inserts/updates/vacuum analyze

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group