Skip site navigation (1) Skip section navigation (2)

Re: sequence scan problem

From: Jeremy Harris <jgh(at)wizmail(dot)org>
To: Pgsql-Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: sequence scan problem
Date: 2008-06-29 22:10:40
Message-ID: 48680860.2000300@wizmail.org (view raw or flat)
Thread:
Lists: pgsql-performance
John Beaver wrote:
> I'm having a strange problem with a query. The query is fairly simple, 
> with a few constants and two joins. All relevant columns should be 
> indexed, and I'm pretty sure there aren't any type conversion issues. 
> But the query plan includes a fairly heavy seq scan. The only possible 
> complication is that the tables involved are fairly large - hundreds of 
> millions of rows each.
> 
> Can anyone explain this? There should only ever be a maximum of about 50 
> rows returned when the query is executed.

You didn't say when you last vacuumed?
If there should only be 50 rows returned then the estimates from the
planner are way out.

If that doesn't help, we'll need version info, and (if you can afford
the time) an "explain analyze"

Cheers,
  Jeremy

In response to

Responses

pgsql-performance by date

Next:From: John BeaverDate: 2008-06-29 22:20:20
Subject: Re: sequence scan problem
Previous:From: John BeaverDate: 2008-06-29 21:52:24
Subject: sequence scan problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group