Re: postgresql does seqscan instead of using an existing index - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: postgresql does seqscan instead of using an existing index
Date
Msg-id 20020906081539.A25187@mail.libertyrms.com
Whole thread Raw
In response to postgresql does seqscan instead of using an existing index  ("Jan Weerts" <j.weerts@i-views.de>)
List pgsql-general
On Thu, Sep 05, 2002 at 07:49:31PM +0200, Jan Weerts wrote:
> Hi all!
>
> I hope this is the right list for this question, if not, please
> direct me to the appropriate one. This mail is rather longish, so
> thanks in advance to all, who dare to read :-).

Just off the top of my head:

You don't say how big the table is.  Maybe a seqscan is right.  Does
the explain output contain the right estimate of how many rows get
returned?  Have you ANALYSEd?

Also, I saw a NOT IN in your query.  This is a well-known drag on
performance in PostgreSQL.  Use NOT EXISTS instead.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: 7.3b1 installation
Next
From: Andrew Sullivan
Date:
Subject: Re: 7.3b1 installation