Please help to speed up UPDATE statement - Mailing list pgsql-general

From Andrus
Subject Please help to speed up UPDATE statement
Date
Msg-id d3gmlt$gm8$1@news.hub.org
Whole thread Raw
Responses Re: Please help to speed up UPDATE statement
List pgsql-general
The following statement runs VERY slowly on large tables.

Any idea how to speed it up ?

UPDATE rid SET dokumnr=NULL WHERE
   dokumnr NOT IN (SELECT dokumnr FROM dok);

Tables:

CREATE TABLE dok ( dokumnr INTEGER,
            CONSTRAINT dok_pkey PRIMARY KEY (dokumnr) );

CREATE TABLE rid ( dokumnr INTEGER  );
CREATE INDEX rid_dokumnr_idx ON rid (dokumnr);


Andrus




pgsql-general by date:

Previous
From: Bill Chandler
Date:
Subject: Re: Unique constraint violation on serial column
Next
From: "None"
Date:
Subject: Re: Asyncron replication from wan to lan with PostgreSQL 8