Re: why does explain tell me I'm using a seq scan? - Mailing list pgsql-general

From Mark Harrison
Subject Re: why does explain tell me I'm using a seq scan?
Date
Msg-id 3FAFE19C.8080009@pixar.com
Whole thread Raw
In response to why does explain tell me I'm using a seq scan?  (Mark Harrison <mh@pixar.com>)
List pgsql-general
Adam Ruth wrote:
> The optimizer is looking at the statistics and figuring that the second
> query could be done better with a sequential scan (perhaps there aren't
> many rows).  Have you analyzed the table to get the statistics up to
> date?  It could also be that the seq scan is faster with the size of
> your table.

Thanks!  An analyze fixed it and reduced our search time from seconds
to milliseconds.

Is there ever any reason to do a "vacuum" without doing a "vacuum analyze"?

Mark


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Two build problems - openssl and plperl on RedHat
Next
From: Bruce Momjian
Date:
Subject: Re: Temp rows - is it possible?