Re: sequence scan problem - Mailing list pgsql-performance

From Tom Lane
Subject Re: sequence scan problem
Date
Msg-id 28999.1214839555@sss.pgh.pa.us
Whole thread Raw
In response to Re: sequence scan problem  (John Beaver <john.e.beaver@gmail.com>)
Responses Re: sequence scan problem
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Peter Schuller
Date:
Subject: VACUUM ANALYZE blocking both reads and writes to a table
Next
From: Alvaro Herrera
Date:
Subject: Re: VACUUM ANALYZE blocking both reads and writes to a table