Re: Join of small table with large table

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: large scale <largescale_1999(at)yahoo(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Join of small table with large table
Date: 2002-05-13 16:09:39
Message-ID: 20020513090304.W99254-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2002-05-13 16:30:17 Re: strange explain
Previous Message Oleg Bartunov 2002-05-13 16:08:36 Re: strange explain