From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Nathan Boley" <nate(dot)boley(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Update Perrformance with nested loop vs. merge-join |
Date: | 2006-12-06 23:05:34 |
Message-ID: | 3468.1165446334@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Nathan Boley" <nate(dot)boley(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Cornelia Boenigk | 2006-12-06 23:23:47 | VACUUM and transactions in different databases |
Previous Message | Casey Duncan | 2006-12-06 23:05:26 | Re: Anything I can do to speed up this query? |