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 CA4F9D1D12E for ; Mon, 5 Apr 2004 15:53:44 +0000 (GMT) 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 29651-02 for ; Mon, 5 Apr 2004 12:54:13 -0300 (ADT) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 952FCD1CCCA for ; Mon, 5 Apr 2004 12:53:42 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 4775049; Mon, 05 Apr 2004 08:55:40 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Heiko Kehlenbrink" , pgsql-performance@postgresql.org Subject: Re: performance comparission postgresql/ms-sql server Date: Mon, 5 Apr 2004 08:52:51 -0700 User-Agent: KMail/1.4.3 References: <48932.195.243.253.146.1081179099.squirrel@webmail.fh-oldenburg.de> In-Reply-To: <48932.195.243.253.146.1081179099.squirrel@webmail.fh-oldenburg.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200404050852.51709.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/37 X-Sequence-Number: 6337 Heiko, > 100.000 from 50.000.000: > > postgres: 0.88 sec > ms-sql: 0.38 sec > > 200.000 from 50.000.000: > > postgres: 1.57 sec > ms-sql: 0.54 sec > > 500.000 from 50.000.000: > > postgres: 3.66 sec > ms-sql: 1.18 sec Questions: 1. Is this the time to return *all rows* or just the first row? Given the different way that PostgreSQL fetches rows to the client from MSSQL, it makes a difference. 2. What are your sort-mem and shared-mem settings? 3. Have you tried clustering the table? 4. Have you done a comparison of selecting random or scattered, instead of serial rows? MSSQL has a tendency to physically store rows in "order" which gives it a certain advantage in this kind of query. -- Josh Berkus Aglio Database Solutions San Francisco