Re: [GENERAL] on delete cascade slowing down delete

2008-08-25 Thread Ivan Sergio Borgonovo
On Sun, 24 Aug 2008 13:37:11 +0200 Alban Hertroys [EMAIL PROTECTED] wrote: Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin with. You'd just be reindexing the auto-generated unique

Re: [GENERAL] on delete cascade slowing down delete

2008-08-24 Thread Alban Hertroys
On Aug 22, 2008, at 9:45 AM, Ivan Sergio Borgonovo wrote: On Fri, 22 Aug 2008 08:48:30 +0200 Alban Hertroys [EMAIL PROTECTED] wrote: Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin

Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Alban Hertroys
Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin with. You'd just be reindexing the auto-generated unique index on s (due to it being a PK). delete from p; And no, this would most

Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Ivan Sergio Borgonovo
On Fri, 22 Aug 2008 08:48:30 +0200 Alban Hertroys [EMAIL PROTECTED] wrote: Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin with. You'd just be reindexing the auto-generated unique

[GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Ivan Sergio Borgonovo
I've a large table with a pk and several smaller tables with fk referencing to it. deleting from the first table is very slow. Not all the related fk have indexes but they are VERY small (0 to 100 records) while the main table contain 600-800K records. the explain delete p; doesn't give any

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Alan Hodgson
On Thursday 21 August 2008, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: I've a large table with a pk and several smaller tables with fk referencing to it. deleting from the first table is very slow. Not all the related fk have indexes but they are VERY small (0 to 100 records) while the

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Joshua Drake
On Thu, 21 Aug 2008 10:16:21 -0700 Alan Hodgson [EMAIL PROTECTED] wrote: Any hint to track down the problem? 1) Define slow. 2) Tell us what your disk subsystem consists of. 3) Are there any delete triggers on the tables? And the EXPLAIN ANALYZE Joshua D. Drake -- The

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread David Fetter
On Thu, Aug 21, 2008 at 07:06:32PM +0200, Ivan Sergio Borgonovo wrote: I've a large table with a pk and several smaller tables with fk referencing to it. deleting from the first table is very slow. Not all the related fk have indexes but they are VERY small (0 to 100 records) while the

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Ivan Sergio Borgonovo
On Thu, 21 Aug 2008 10:19:44 -0700 Joshua Drake [EMAIL PROTECTED] wrote: On Thu, 21 Aug 2008 10:16:21 -0700 Alan Hodgson [EMAIL PROTECTED] wrote: Any hint to track down the problem? 1) Define slow. still undefined anyway 20-30min compared to over 2h and still running. 2) Tell us