pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Beaver <john.e.beaver@gmail.com>
Cc: Jeremy Harris <jgh@wizmail.org>
Cc: Pgsql-Performance <pgsql-performance@postgresql.org>
Subject: Re: sequence scan problem
Date: Mon, 30 Jun 2008 11:25:55 -0400
Message-ID: <28999.1214839555@sss.pgh.pa.us> (raw)
In-Reply-To: <4868BC74.6020006@gmail.com>
References: <48680418.7030708@gmail.com>
	<48680860.2000300@wizmail.org>
	<4868BC74.6020006@gmail.com>

John Beaver <john.e.beaver@gmail.com> writes:
> Ok, here's the explain analyze result. Again, this is Postgres 8.3.3 and 
> I vacuumed-analyzed both tables directly after they were created.

>  Merge Join  (cost=1399203593.41..6702491234.74 rows=352770803726 
> width=22) (actual time=6370194.467..22991303.434 rows=15610535128 loops=1)
                                                        ^^^^^^^^^^^

Weren't you saying that only 50 rows should be returned?  I'm thinking
the real problem here is pilot error: you missed out a needed join
condition or something.  SQL will happily execute underconstrained
queries ...

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <28999.1214839555@sss.pgh.pa.us>
Permalink:  ../28999.1214839555@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28999.1214839555@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, john.e.beaver@gmail.com, jgh@wizmail.org
  Subject: Re: sequence scan problem
  In-Reply-To: <28999.1214839555@sss.pgh.pa.us>

* 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