Re: [PERFORM] Delete operation VERY slow...

2006-06-16 Thread Tom Lane
David Leangen <[EMAIL PROTECTED]> writes: > The only inconvenience is that I need to remove all the foreign key > constraints before truncating, then put them back after. I was about to ask if you had any. Usually the reason for DELETE being slow is that you have foreign key references to (not fr

Re: [PERFORM] Delete operation VERY slow...

2006-06-16 Thread PFC
Wow! That was almost instantaneous. I can't believe the difference. The only inconvenience is that I need to remove all the foreign key constraints before truncating, then put them back after. But I suppose it is a small price to pay for this incredible optimization. In that case, your DELET

Re: [PERFORM] Delete operation VERY slow...

2006-06-16 Thread David Leangen
Wow! That was almost instantaneous. I can't believe the difference. The only inconvenience is that I need to remove all the foreign key constraints before truncating, then put them back after. But I suppose it is a small price to pay for this incredible optimization. Thank you! On Fri, 2006-

Re: [PERFORM] Delete operation VERY slow...

2006-06-16 Thread Gourish Singbal
  David,   Truncate table would be a good idea if u want to delete all the data in the table. You need not perform vacuum in this case since there are no dead rows created.   ~gourish  On 6/16/06, David Leangen <[EMAIL PROTECTED]> wrote: Hello!I am trying to delete an entire table. There are about

Re: [PERFORM] Delete operation VERY slow...

2006-06-16 Thread A. Kretschmer
am 16.06.2006, um 15:58:46 +0900 mailte David Leangen folgendes: > > Hello! > > I am trying to delete an entire table. There are about 41,000 rows in > the table (based on count(*)). > > I am using the SQL comment: delete from table; Use TRUNCATE table. Andreas -- Andreas Kretschmer(Kon

[PERFORM] Delete operation VERY slow...

2006-06-16 Thread David Leangen
Hello! I am trying to delete an entire table. There are about 41,000 rows in the table (based on count(*)). I am using the SQL comment: delete from table; The operation seems to take in the order of hours, rather than seconds or minutes. "Explain delete from table" gives me: