Re: Join of small table with large table

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Join of small table with large table
Дата
Msg-id 20020513090304.W99254-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Join of small table with large table  (large scale <largescale_1999@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: strange explain
Следующее
От: mlw
Дата:
Сообщение: Re: pgaccess - the discussion is over