pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Beaver <john.e.beaver@gmail.com>
To: Jeremy Harris <jgh@wizmail.org>
Cc: Pgsql-Performance <pgsql-performance@postgresql.org>
Subject: Re: sequence scan problem
Date: Sun, 29 Jun 2008 18:32:03 -0400
Message-ID: <48680D63.8090107@gmail.com> (raw)
In-Reply-To: <48680860.2000300@wizmail.org>
References: <48680418.7030708@gmail.com>
	<48680860.2000300@wizmail.org>

Oh, and the version is 8.3.3.

Jeremy Harris wrote:
> 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
>



view thread (8+ messages)  latest in thread

Message-ID: <48680D63.8090107@gmail.com>
Permalink:  ../48680D63.8090107@gmail.com/
Also on:    postgresql.org/message-id/48680D63.8090107@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: john.e.beaver@gmail.com, jgh@wizmail.org
  Subject: Re: sequence scan problem
  In-Reply-To: <48680D63.8090107@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox