Re: Join of small table with large table - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Join of small table with large table
Date
Msg-id 20020513090304.W99254-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Join of small table with large table  (large scale <largescale_1999@yahoo.com>)
List pgsql-hackers
On Fri, 10 May 2002, large scale wrote:

> Hi,
>
> I have two tables, one has 25000 rows and the other
> has 6.5 million rows.
>
> (25000 rows)
> table1
> (id     text,
> start  int,
> stop  int)
>
> with seperate index on three individual fiels.
>
> 6.5 million rows
> table2
> (id  text,
> start  int,
> stop  int)
>
> with seperate index on three individual fields.

We'll start with the standard questions:  Have you
vacuum analyzed?  What version are you running? (if
it's less than 7.2, you may want to see about
upgrading) If you do a set enable_seqscan=false;
what does the explain show then?  I'd be interested
in know if 1024601931 is even remotely a valid number
of rows from that join as well (which is about
.5% of an entire cartesian join if my math is right).

Perhaps some exists style thing would be faster since
that would at least presumably be able to stop when
it found a matching table2 row for a particular table1
id.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: strange explain
Next
From: mlw
Date:
Subject: Re: pgaccess - the discussion is over