Re: Update Perrformance with nested loop vs. merge-join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Update Perrformance with nested loop vs. merge-join
Дата
Msg-id 3468.1165446334@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Update Perrformance with nested loop vs. merge-join  ("Nathan Boley" <nate.boley@gmail.com>)
Список pgsql-general
"Nathan Boley" <nate.boley@gmail.com> writes:
> Merge Join  (cost=883182.60..1024622.03 rows=6873573 width=89)
>   Merge Cond: ("outer".pkeycolumn1 = "inner".pkey)
>   ->  Sort  (cost=93387.50..94711.01 rows=529404 width=18)
>         Sort Key: table2.pkey
>         ->  Seq Scan on table2 (cost=0.00..15037.04 rows=529404 width=18)
>   ->  Sort  (cost=789795.10..795605.39 rows=2324116 width=81)
>         Sort Key: table1.pkeycolumn1
>         ->  Seq Scan on table1  (cost=0.00..71900.16 rows=2324116 width=81)

> This seems like it *should* be the best query to me, but when I try and run
> it it takes forever.

What PG version is this, and what have you got work_mem (or sort_mem)
set to?  I'm betting the sorts are slow ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Casey Duncan
Дата:
Сообщение: Re: Anything I can do to speed up this query?
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Trying to Understand Table Inheritance