Re: Deleting row in 7.4 takes for ever

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bharat Patel" <bharatpatelk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Deleting row in 7.4 takes for ever
Date: 2008-04-11 23:12:46
Message-ID: 18651.1207955566@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Bharat Patel" <bharatpatelk(at)gmail(dot)com> writes:
> I have a table that has 5.4 million rows of data in it. 4.6 million of
> these rows are just administrative messages and not necessary so I'd like to
> delete them. If I try and delete them, it takes 69 minutes to delete ~650K
> rows.

I'm betting on an unindexed foreign-key constraint linking to this
table.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reece Hart 2008-04-12 00:31:15 Re: tsearch2 and hyphenated terms
Previous Message Bharat Patel 2008-04-11 22:57:54 Deleting row in 7.4 takes for ever