pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Yusuf <yusuf0478@netscape.net>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Deleting one record from a table taking 17s.
Date: 20 Jun 2003 18:04:56 -0400
Message-ID: <1056130147.42342.1.camel@jester> (raw)
In-Reply-To: <3EF33F22.4000801@netscape.net>
References: <3EF32DF8.3060900@netscape.net>
	<1056125163.41752.31.camel@jester>
	<3EF33F22.4000801@netscape.net>

On Fri, 2003-06-20 at 13:06, Yusuf wrote:
> rbt@rbt.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@rbt.ca>

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

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (5+ messages)

Message-ID: <1056130147.42342.1.camel@jester>
Permalink:  ../1056130147.42342.1.camel@jester/
Also on:    postgresql.org/message-id/1056130147.42342.1.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: rbt@rbt.ca, yusuf0478@netscape.net
  Subject: Re: Deleting one record from a table taking 17s.
  In-Reply-To: <1056130147.42342.1.camel@jester>
  References: <3EF32DF8.3060900@netscape.net> <1056125163.41752.31.camel@jester> <3EF33F22.4000801@netscape.net> <1056130147.42342.1.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox