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