Re: Very slow joins - Mailing list pgsql-general

From MS
Subject Re: Very slow joins
Date
Msg-id d1855c3a-63a6-4e51-81eb-6ae9711043c1@y7g2000yqa.googlegroups.com
Whole thread Raw
In response to Re: Very slow joins  (MS <fretka1990@gmail.com>)
Responses Re: Very slow joins
Re: Very slow joins
List pgsql-general
> can we see an explain analyze at least?
>

Hi,
Well, it won't be necessary - I mean it looks just like the explain I
sent in my first post.
BUT I found the real cause of my problem - the "fk2" field from my
example had not only an index, but it was also a foreign key to
another table.
I believe the update took so long because pgsql was checking if the
changes don't break the referential integrity.
When I dropped the FK constraint (and index too - just in case) the
update took around 3 minutes which is acceptable.
So - problem solved, postgres good. ;) But isn't there a way to make
some bulk operations without having to drop indexes/FKs?
Something that would work like:

begin transaction + forget about RI
make some lenghty operation (update/delete...)
if RI is OK then commit; else rollback

Thanks,
MS

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Disable databse listing for non-superuser (\l) ?
Next
From: Nick Boutelier
Date:
Subject: Is there a RECORD[] type in plpgsql?