pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrus <eetasoft@online.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query runs too long for indexed tables
Date: Wed, 05 Apr 2006 10:09:55 -0400
Message-ID: <27543.1144246195@sss.pgh.pa.us> (raw)
In-Reply-To: <e1039l$15ie$1@news.hub.org>
References: <e0ui0o$2v0m$2@news.hub.org>
	<1144180128.32266.56.camel@state.g2switchworks.com>
	<e1039l$15ie$1@news.hub.org>

"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



view thread (9+ messages)

Message-ID: <27543.1144246195@sss.pgh.pa.us>
Permalink:  ../27543.1144246195@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27543.1144246195@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eetasoft@online.ee
  Subject: Re: Query runs too long for indexed tables
  In-Reply-To: <27543.1144246195@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox