X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 46D6C30E590 for ; Fri, 20 Jun 2003 22:04:56 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 12046-03 for ; Fri, 20 Jun 2003 19:04:45 -0300 (ADT) Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by svr1.postgresql.org (Postfix) with ESMTP id 6270330EF10 for ; Fri, 20 Jun 2003 19:04:45 -0300 (ADT) Received: from [192.168.1.200] ([216.209.81.133]) by tomts14-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030620220440.VHYR4044.tomts14-srv.bellnexxia.net@[192.168.1.200]>; Fri, 20 Jun 2003 18:04:40 -0400 Subject: Re: Deleting one record from a table taking 17s. From: Rod Taylor To: Yusuf Cc: pgsql-performance In-Reply-To: <3EF33F22.4000801@netscape.net> References: <3EF32DF8.3060900@netscape.net> <1056125163.41752.31.camel@jester> <3EF33F22.4000801@netscape.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-5tSNl9yBpTZxALZSMo2S" Message-Id: <1056130147.42342.1.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 20 Jun 2003 18:04:56 -0400 X-Archive-Number: 200306/133 X-Sequence-Number: 2217 --=-5tSNl9yBpTZxALZSMo2S Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-06-20 at 13:06, Yusuf wrote: > rbt@rbt.ca wrote: > > On Fri, 2003-06-20 at 15:53, Yusuf wrote: > >=20 > >>Why would the following query take soo long to run? What does 28.12 mse= c represent, since the total running time is=20 > >>16801.86 ms. > >=20 > >=20 > > 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. > >=20 > > Those are not represented in the explains at the moment. > >=20 >=20 > That's what I thought at first, so I dropped the foreign key constraints.= The table is referenced by 2 tables, one of=20 > 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. --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-5tSNl9yBpTZxALZSMo2S Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+80Rj6DETLow6vwwRAp6pAJ0aBrLk/nJt19YpEUKSCqpHLNZcMwCfVJWh Q/7rhkID3nLEj1/u6spRVSc= =svai -----END PGP SIGNATURE----- --=-5tSNl9yBpTZxALZSMo2S--