X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E50A95E37D0 for ; Wed, 25 Aug 2004 16:27:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10190-10 for ; Wed, 25 Aug 2004 19:27:02 +0000 (GMT) Received: from mammoth.utopiasystems.net (meridian1.utopiasystems.net [66.150.45.40]) by svr1.postgresql.org (Postfix) with ESMTP id B5DED5E3632 for ; Wed, 25 Aug 2004 16:27:00 -0300 (ADT) Received: from [192.168.1.100] ([67.173.111.107]) by mammoth.utopiasystems.net with Microsoft SMTPSVC(6.0.3790.0); Wed, 25 Aug 2004 15:24:44 -0400 User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Wed, 25 Aug 2004 14:26:52 -0500 Subject: Re: Odd query behavior [urgent, but long] From: Steve Lane To: Tom Lane Cc: , Jamie Thomas Message-ID: In-Reply-To: <2190.1093461392@sss.pgh.pa.us> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 25 Aug 2004 19:24:45.0437 (UTC) FILETIME=[2DD02AD0:01C48AD9] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_RFCI X-Spam-Level: X-Archive-Number: 200408/248 X-Sequence-Number: 14643 > From: Tom Lane > Date: Wed, 25 Aug 2004 15:16:32 -0400 > To: Steve Lane > Cc: pgsql-admin@postgresql.org, Jamie Thomas > Subject: Re: [ADMIN] Odd query behavior [urgent, but long] > > Steve Lane writes: >> I have enabled pretty extensive query logging on the 7.1.3 instance. What I >> see is that certain queries take hideously long. > > Tell us about foreign keys associated with the table being updated? > An UPDATE would fire triggers for both referencing and referenced keys ... > > I'm suspecting an unindexed or datatype-incompatible foreign key column. Hi Tom: Thanks. There are, unfortunately, no foreign keys or triggers anywhere in the db that I know of. And this query is not always slow, just occasionally. -- sgl