Unix Technical Forum

Deleting row in 7.4 takes for ever

This is a discussion on Deleting row in 7.4 takes for ever within the Pgsql General forums, part of the PostgreSQL category; --> Hello, I'm new to postgres and the work of DB's. I'm running postres 7.4 on RHLinux 3. I have ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 02:05 AM
Bharat Patel
 
Posts: n/a
Default Deleting row in 7.4 takes for ever

Hello,



I'm new to postgres and the work of DB's.

I'm running postres 7.4 on RHLinux 3.

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. The current postgres configurations are defaults in postgres.conf
file. I've tried bumping up the shared_bufferes in the conf file, but it
does not help. Also I am unable to start postgres is I change the
shared_buffers to a values higher then 2000.



We have a project underway to upgrade to postgres 8.2, but that will take
some time, so I'd like to delete these in 7.4 if at all possible in a
reasonable amount of time so that I can minimize production impact to
customers.



Any and all suggestion will be greatly appreciated.



Regards

Bharat




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 02:05 AM
Tom Lane
 
Posts: n/a
Default Re: Deleting row in 7.4 takes for ever

"Bharat Patel" <bharatpatelk@gmail.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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com