From: | Chris Gamache <cgg007(at)yahoo(dot)com> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Foreign Key ON DELETE CASCADE Performance |
Date: | 2004-04-30 19:36:20 |
Message-ID: | 20040430193620.62742.qmail@web13806.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bruno, you're a genius! :)
I /had/ missed adding a single index. It made all the difference in the world.
Boy! That's a relief.
CG
--- Bruno Wolff III <bruno(at)wolff(dot)to> wrote:
> On Fri, Apr 30, 2004 at 09:35:39 -0700,
> Chris Gamache <cgg007(at)yahoo(dot)com> wrote:
> >
> > What can be done to increase the overall speed of this transaction, keeping
> the
> > FKey Constraints in-place?
>
> The fastest thing to do if you really want to get rid of everything is
> do delete from for each of the tables starting with the ones that don't
> have any tables dependent on them.
>
> Another thing to note is that postgres doesn't automatically create
> an index on columns that reference another table. When you are taking
> advantage of cascading deletes you normally will want an index on such
> columns. If you insist upon being able to do the delete using just a delete
> from table1 you will want to create these indexes.
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2004-04-30 20:57:39 | Re: Timestamp problems...wrong weeks. |
Previous Message | Jim Steinberger | 2004-04-30 18:46:24 | Re: JDBC caching plpgsql function errors? |