Re: Delete performance again - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Delete performance again
Date
Msg-id 331e40660810100124h7aef87cap4cabbf15848b9380@mail.gmail.com
Whole thread Raw
In response to Re: Delete performance again  ("Віталій Тимчишин" <tivv00@gmail.com>)
List pgsql-performance
BTW: Have just tried "clean" (without any foreign keys constraints) peformance of
"delete from tbl where field not in (select)"
vs
"create temporary table tmp(id)  as select distinct field from tbl; delete from tmp where id in (select); delete from tbl where field in (select id from tmp)".
both tbl and select are huge.
tbl cardinality is ~5 million, select is ~1 milliion. Number of records to delete is small.
select is simply "select id from table2".

First (simple) one could not do in a night, second did in few seconds.

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: "Mysterious" issues with newly installed 8.3
Next
From: Kiran Mukhyala
Date:
Subject: Re: inaccurate stats on large tables