Re: Index usage

From: Pedro Alves <pmalves(at)think(dot)pt>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>, PostGreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index usage
Date: 2003-08-26 14:20:14
Message-ID: 20030826142014.GA13538@cosmos.inesc.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It's the same even with statistics=1000.

Is there any way to enable_seqscan=off just for this query?

On Tue, Aug 26, 2003 at 10:07:02AM -0400, Tom Lane wrote:
> Pedro Alves <pmalves(at)think(dot)pt> writes:
> > The vacuum analyze is run on daily basis, so that cannot be the point.
>
> The next thing I'd try to improve the planner's guess is to increase the
> statistics target for the ra_datacolh column (see ALTER TABLE SET
> STATISTICS). It looks like the default of 10 is too small for that
> column --- try 100 and see if the rowcount estimates get any closer.
>
> regards, tom lane

--
Pedro Miguel G. Alves pmalves(at)think(dot)pt
THINK - Tecnologias de Informação www.think.pt
Tel: +351 21 413 46 00 Av. José Gomes Ferreira
Fax: +351 21 413 46 09 nº 13 1495-139 ALGÉS

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Björklund 2003-08-26 14:21:52 Re: Index usage
Previous Message Tom Lane 2003-08-26 14:17:48 Re: many columns with references to one table