Skip site navigation (1) Skip section navigation (2)

Re: Deleting one record from a table taking 17s.

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Yusuf <yusuf0478(at)netscape(dot)net>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Deleting one record from a table taking 17s.
Date: 2003-06-20 22:04:56
Message-ID: 1056130147.42342.1.camel@jester (view raw or flat)
Thread:
Lists: pgsql-performance
On Fri, 2003-06-20 at 13:06, Yusuf wrote:
> rbt(at)rbt(dot)ca wrote:
> > On Fri, 2003-06-20 at 15:53, Yusuf wrote:
> > 
> >>Why would the following query take soo long to run? What does 28.12 msec represent, since the total running time is 
> >>16801.86 ms.
> > 
> > 
> > I'd hazard to guess that you have a whole slew of foreign keys cascading
> > to delete, update, or check many rows from other tables.
> > 
> > Those are not represented in the explains at the moment.
> > 
> 
> That's what I thought at first, so I dropped the foreign key constraints.  The table is referenced by 2 tables, one of 
> which has around 200 000 records and the other has 0 records.

Hmm... EXPLAIN ANALYZE your select again, but join both of those
referenced tables to the appropriate columns.

-- 
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

pgsql-performance by date

Next:From: Howard OblowitzDate: 2003-06-23 06:40:09
Subject: Unsubscribe
Previous:From: YusufDate: 2003-06-20 17:06:42
Subject: Re: Deleting one record from a table taking 17s.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group