X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id EB708CC8D7 for ; Thu, 17 Jul 2003 14:38:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 19588-08 for ; Thu, 17 Jul 2003 14:38:24 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id 43651CCA32 for ; Thu, 17 Jul 2003 11:37:59 -0300 (ADT) Received: from tmsl-adsl.demon.co.uk ([80.177.114.181] helo=bacon.tmsl.demon.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19d9ts-0005rq-0Z; Thu, 17 Jul 2003 15:38:28 +0100 Date: Thu, 17 Jul 2003 15:38:25 +0100 From: Paul Thomas To: Fabian Kreitner Cc: "pgsql-performance @ postgresql . org" Subject: Re: index / sequential scan problem Message-ID: <20030717153825.C27991@bacon> References: <5.1.0.14.0.20030717131157.03957fa0@195.145.148.245> <5.1.0.14.0.20030717105203.03d2b5c0@195.145.148.245> <5.1.0.14.0.20030717105203.03d2b5c0@195.145.148.245> <20030717111248.C27264@bacon> <5.1.0.14.0.20030717131157.03957fa0@195.145.148.245> <20030717133445.A27991@bacon> <5.1.0.14.0.20030717144625.039c4a10@195.145.148.245> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <5.1.0.14.0.20030717144625.039c4a10@195.145.148.245>; from fabian.kreitner@ainea-ag.de on Thu, Jul 17, 2003 at 13:50:30 +0100 X-Mailer: Balsa 1.2.3 Lines: 33 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/254 X-Sequence-Number: 2547 On 17/07/2003 13:50 Fabian Kreitner wrote: > [snip] > Im afraid, no. > Database has been stopped / started right before this. > [snip] 1) enable_seqscan = true > Seq Scan on notiz_objekt a (cost=0.00..56125.80 rows=15561 width=12) > (actual time=0.28..2298.71 rows=31122 loops=1) > [snip] 2) enable_seqscan = false > Seq Scan on notiz_objekt a (cost=100000000.00..100111719.36 rows=15561 > width=12) (actual time=0.25..535.75 rows=31122 loops=1) I've just noticed this. Something is not right here. Look at the crazy cost estimation for the second query. It looks to me like enable_indexscan, enable_tidscan, enable_sort, enable_nestloop, enable_mergejoin or enable_hashjoin have been set to false. Looking at the source, thats the only way I can see that such large numbers can be produced. HTH -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+