Re: [PERFORM] Poor performance of delete by primary key

2005-09-07 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 11:07:04AM +0800, Christopher Kings-Lynne wrote: > >Unfortunately there's no very simple way to determine which FK is the > >problem. (In 8.1 it'll be possible to do that with EXPLAIN ANALYZE, > >but in existing releases EXPLAIN doesn't break out the time spent in > >each t

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Christopher Kings-Lynne
Unfortunately there's no very simple way to determine which FK is the problem. (In 8.1 it'll be possible to do that with EXPLAIN ANALYZE, but in existing releases EXPLAIN doesn't break out the time spent in each trigger ...) You have to just eyeball the schema :-(. phpPgAdmin has a handy info

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Tom Lane
Mark Lewis <[EMAIL PROTECTED]> writes: > I had a similar problem, so I downloaded 8.1 from CVS, ran it on a > relatively gnarly dev workstation, imported a dump of my 8.0 database, > and ran my troublesome queries with the new EXPLAIN ANALYZE. > This process took about an hour and worked great, pr

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Mark Lewis
I had a similar problem, so I downloaded 8.1 from CVS, ran it on a relatively gnarly dev workstation, imported a dump of my 8.0 database, and ran my troublesome queries with the new EXPLAIN ANALYZE. This process took about an hour and worked great, provided that you've actually named your foreign

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Richard Huxton
Brian Choate wrote: Hello, We are seeing a very strange behavior from postgres. For one of our very common tasks we have to delete records from a table of around 500,000 rows. The delete is by id which is the primary key. It seems to be consistently taking around 10 minutes to preform. This is t

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Matthew Sackman
On Tue, Sep 06, 2005 at 11:32:00AM -0400, Tom Lane wrote: > "Brian Choate" <[EMAIL PROTECTED]> writes: > > We are seeing a very strange behavior from postgres. For one of our very = > > common tasks we have to delete records from a table of around 500,000 = > > rows. The delete is by id which is th

Re: [PERFORM] Poor performance of delete by primary key

2005-09-06 Thread Tom Lane
"Brian Choate" <[EMAIL PROTECTED]> writes: > We are seeing a very strange behavior from postgres. For one of our very = > common tasks we have to delete records from a table of around 500,000 = > rows. The delete is by id which is the primary key. It seems to be = > consistently taking around 10 mi