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 21B17CC9A6 for ; Thu, 17 Jul 2003 12:52:28 +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 19277-01 for ; Thu, 17 Jul 2003 12:52:42 +0000 (GMT) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id B1A7ACC8CD for ; Thu, 17 Jul 2003 09:52:15 -0300 (ADT) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h6HCuiD1016780 for ; Thu, 17 Jul 2003 18:26:44 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by smtp.pspl.co.in (8.12.9/8.12.9) with ESMTP id h6HCuiuf016767 for ; Thu, 17 Jul 2003 18:26:44 +0530 From: "Shridhar Daithankar" To: pgsql-performance@postgresql.org Date: Thu, 17 Jul 2003 18:24:27 +0530 MIME-Version: 1.0 Subject: Re: index / sequential scan problem Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3F16E9DB.15319.90FDAD@localhost> In-reply-to: <5.1.0.14.0.20030717144625.039c4a10@195.145.148.245> References: <20030717133445.A27991@bacon> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/252 X-Sequence-Number: 2545 On 17 Jul 2003 at 14:50, Fabian Kreitner wrote: > At 14:34 17.07.2003, you wrote: > >I expect you will find that the third query is also a lot faster that the > >first query. > > Im afraid, no. > Database has been stopped / started right before this. > > perg_1097=# set enable_seqscan to true; > SET VARIABLE > perg_1097=# EXPLAIN ANALYZE select notiz_id, obj_id, obj_typ > perg_1097-# from notiz_objekt a > perg_1097-# where not exists Well, he said query and not the query plan...:-) While explain analyze is great for judging what is happening, it's not always a good idea to trust the numbers produced by it. It will probably produce same number for a SCSI disk machine and for a IDE disk machine, everything else being equal. Obviously that is not correct. Only thing you can trust in explain analyze is it's plan. Numbers are based on heuristic and should be taken as hint only. Bye Shridhar -- Harrisberger's Fourth Law of the Lab: Experience is directly proportional to the amount of equipment ruined.