Re: Query runs too long for indexed tables - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query runs too long for indexed tables
Date
Msg-id 27543.1144246195@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query runs too long for indexed tables  ("Andrus" <eetasoft@online.ee>)
List pgsql-performance
"Andrus" <eetasoft@online.ee> writes:
> UPDATE firma1.rid SET toode=NULL
>         WHERE toode IS NOT NULL AND
>         toode NOT IN (SELECT TOODE      FROM firma1.TOODE);

> How to speed this up ?

Increasing work_mem to the point where you get a hashed NOT-IN would
help, probably.  Have you tried using EXPLAIN to see what the plan is
for the UPDATEs?

            regards, tom lane

pgsql-performance by date:

Previous
From: PFC
Date:
Subject: Re: Query runs too long for indexed tables
Next
From: "Juan Casero \(FL FLC\)"
Date:
Subject: Sun Fire T2000 and PostgreSQL 8.1.3