Re: Non Matching Records in Two Tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ken(at)scottshill(dot)com
Cc: Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Non Matching Records in Two Tables
Date: 2006-02-14 21:07:29
Message-ID: 22658.1139951249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ken Hill <ken(at)scottshill(dot)com> writes:
> Seq Scan on ncccr10 (cost=0.00..20417160510.08 rows=305782 width=104)
> Filter: (NOT (subplan))
> SubPlan
> -> Seq Scan on ncccr9 (cost=0.00..65533.71 rows=494471 width=104)
> (4 rows)

> Any ideas why it is so slow?

"NOT (subplan)" is horrendous (and the system knows it, note the huge
cost estimate). Try increasing work_mem enough so you get a hashed
subplan instead.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2006-02-14 21:08:29 Re: Non Matching Records in Two Tables
Previous Message Ken Hill 2006-02-14 20:55:07 Re: Non Matching Records in Two Tables