Re: why does explain tell me I'm using a seq scan?

From: Mark Harrison <mh(at)pixar(dot)com>
To: Adam Ruth <aruth(at)intercation(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: why does explain tell me I'm using a seq scan?
Date: 2003-11-10 19:06:04
Message-ID: 3FAFE19C.8080009@pixar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-11-10 19:08:47 Re: Temp rows - is it possible?
Previous Message Peter Eisentraut 2003-11-10 19:00:55 Re: Two build problems - openssl and plperl on RedHat