Re: Index usage

From: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
To: Pedro Alves <pmalves(at)think(dot)pt>
Cc: PostGreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index usage
Date: 2003-08-26 06:37:08
Message-ID: Pine.LNX.4.44.0308260833530.31606-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 25 Aug 2003, Pedro Alves wrote:

> The querys below are exactly the same but refer to different months.
> One case uses indexes, the other doesn't.
>
> Is there anything I can do? Increasing index mem size?

Run "vacuum analyze". The planner seems to think that one of the queries
returns 313 rows while the other returns 2388 rows.

To me that looks like the statistics need to be updated using vacuum
analyze.

Also, explain analyze gives a little more information and is better to
run then just explain.

--
/Dennis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mp torre 2003-08-26 07:51:04 unsubscribe
Previous Message David Lutz 2003-08-26 06:23:32 Re: convert database to unicode