X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 45002D1EE8E for ; Thu, 29 Apr 2004 17:54:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74407-06 for ; Thu, 29 Apr 2004 17:54:20 -0300 (ADT) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 11CE4D1EDB9 for ; Thu, 29 Apr 2004 17:54:18 -0300 (ADT) Received: from [64.81.245.111] (HELO 192.168.1.102) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 4975456; Thu, 29 Apr 2004 13:55:47 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Gary Doades" , pgsql-performance@postgresql.org Subject: Re: planner/optimizer question Date: Thu, 29 Apr 2004 13:54:33 -0700 User-Agent: KMail/1.5.4 References: <409153EF.24647.144E9BF7@localhost> <409172FA.1509.14C7E00E@localhost> In-Reply-To: <409172FA.1509.14C7E00E@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404291354.33304.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=RCVD_NUMERIC_HELO X-Spam-Level: X-Archive-Number: 200404/503 X-Sequence-Number: 6803 Gary, > In this example the statistics don't matter. The plans used were the same for > MSSQL and Postgres. I was trying to eliminate the difference in plans > between the two, which obviously does make a difference, sometimes in > MSSQL favour and sometimes the other way round. Both systems, having > decided to do the same index scan, took noticably different times. The > Postgres database was fully vacuumed and analysed anyway. It's also quite possble the MSSQL simply has more efficient index scanning implementation that we do. They've certainly had incentive; their storage system sucks big time for random lookups and they need those fast indexes. (just try to build a 1GB adjacency list tree on SQL Server. I dare ya). Certainly the fact that MSSQL is essentially a single-user database makes things easier for them. They don't have to maintain multiple copies of the index tuples in memory. I think that may be our main performance loss. -- -Josh Berkus Aglio Database Solutions San Francisco