Re: [GENERAL] How to speed up delete where not in

2015-09-26 Thread Melvin Davidson
In addition to the previous recommendation, make sure you have an index on dokumnr in table omrid. EG: CREATE INDEX omrid_dokumnr_fk ON omrid USING BTREE (dokumnr); On Sat, Sep 26, 2015 at 7:33 AM, David Rowley wrote: > On 26 September 2015 at 19:53, Andrus wrote: > >> Hi! >> >> >> I'm loo

Re: [GENERAL] How to speed up delete where not in

2015-09-26 Thread David Rowley
On 26 September 2015 at 19:53, Andrus wrote: > Hi! > > > I'm looking for a way to delete records which do not have child rows on > big tables where lot of rows needs to be deleted. Both tables have lot of > other foreign key references. > > > Document headers are in omdok table: > >create tab

[GENERAL] How to speed up delete where not in

2015-09-26 Thread Andrus
Hi! I'm looking for a way to delete records which do not have child rows on big tables where lot of rows needs to be deleted. Both tables have lot of other foreign key references. Document headers are in omdok table: create table omdok ( dokumnr serial primary key, ... ); Document rows