X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 37EB0DAC8E for ; Wed, 26 Oct 2005 07:30:54 -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 32395-08 for ; Wed, 26 Oct 2005 10:30:48 +0000 (GMT) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by svr1.postgresql.org (Postfix) with ESMTP id 83C9ADAC41 for ; Wed, 26 Oct 2005 07:30:49 -0300 (ADT) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1EUiYT-0003kq-S0 for pgsql-performance@postgresql.org; Wed, 26 Oct 2005 12:30:51 +0200 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1EUiYV-0000WT-00 for ; Wed, 26 Oct 2005 12:30:51 +0200 Date: Wed, 26 Oct 2005 12:30:51 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: zero performance on query Message-ID: <20051026103051.GB1742@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux 2.6.14-rc5 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 required=5 tests=[AWL=0.010] X-Spam-Level: X-Archive-Number: 200510/384 X-Sequence-Number: 15152 On Tue, Oct 25, 2005 at 10:26:43PM -0600, Sidar López Cruz wrote: > look at this: > select count(*) from fotos where archivo not in (select archivo from > archivos) > Aggregate (cost=4899037992.36..4899037992.37 rows=1 width=0) > -> Seq Scan on fotos (cost=22598.78..4899037338.07 rows=261716 width=0) > Filter: (NOT (subplan)) > SubPlan > -> Materialize (cost=22598.78..39304.22 rows=805344 width=58) > -> Seq Scan on archivos (cost=0.00..13141.44 rows=805344 > width=58) Now, this is interesting; it seems to trigger exactly the same oddity as my query did (at least one of them; the materialized sequential scan). /* Steinar */ -- Homepage: http://www.sesse.net/