Re: Non Matching Records in Two Tables - Mailing list pgsql-sql

From Tom Lane
Subject Re: Non Matching Records in Two Tables
Date
Msg-id 22658.1139951249@sss.pgh.pa.us
Whole thread Raw
In response to Re: Non Matching Records in Two Tables  (Ken Hill <ken@scottshill.com>)
Responses Re: Non Matching Records in Two Tables
List pgsql-sql
Ken Hill <ken@scottshill.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


pgsql-sql by date:

Previous
From: Ken Hill
Date:
Subject: Re: Non Matching Records in Two Tables
Next
From: chester c young
Date:
Subject: Re: Non Matching Records in Two Tables