X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7EA9852806 for ; Mon, 30 May 2005 23:31:12 -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 95908-09 for ; Tue, 31 May 2005 02:31:08 +0000 (GMT) Received: from pillette.com (adsl-67-119-5-202.dsl.snfc21.pacbell.net [67.119.5.202]) by svr1.postgresql.org (Postfix) with ESMTP id CC01E52891 for ; Mon, 30 May 2005 23:31:06 -0300 (ADT) Received: (from andrew@localhost) by pillette.com (8.11.6/8.11.6) id j4V2V6e25466; Mon, 30 May 2005 19:31:06 -0700 Date: Mon, 30 May 2005 19:31:06 -0700 From: andrew@pillette.com Message-Id: <200505310231.j4V2V6e25466@pillette.com> Subject: Re: poor performance involving a small table To: Colton A Smith Cc: pgsql-performance@postgresql.org X-Originating-IP: 64.172.57.4 X-Mailer: Webmin 0.940 MIME-Version: 1.0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.195 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Archive-Number: 200505/453 X-Sequence-Number: 12617 This is a multi-part message in MIME format. --bound1117506666 Content-Type: text/plain Content-Transfer-Encoding: 7bit Colton A Smith wrote .. ------------------------------------------------------------------------------------------------ > Seq Scan on sensor (cost=0.00..1.25 rows=1 width=6) (actual > time=0.055..0.068 rows=1 loops=1) > Filter: (sensor_id = 12) > Total runtime: 801641.333 ms > (3 rows) Do you have some foreign keys pointing in the other direction? In other words, is there another table such that a delete on sensors causing a delete (or a check of some key) in another table? EXPLAIN doesn't show these. And that might be a big table missing an index. --bound1117506666--