Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0C8D31337B7D for ; Tue, 7 Dec 2010 14:20:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 22055-03 for ; Tue, 7 Dec 2010 18:20:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id C22E81337B66 for ; Tue, 7 Dec 2010 14:20:43 -0400 (AST) Received: from alap2.localnet (unknown [80.187.152.123]) by mail.anarazel.de (Postfix) with ESMTPSA id E629B448009; Tue, 7 Dec 2010 19:20:41 +0100 (CET) From: Andres Freund To: pgsql-performance@postgresql.org Subject: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows Date: Tue, 7 Dec 2010 19:20:36 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-rc6-andres-00006-g4193d91; KDE/4.5.1; x86_64; ; ) Cc: Tom Polak References: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com> In-Reply-To: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com> MIME-Version: 1.0 Message-Id: <201012071920.37146.andres@anarazel.de> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_FILL_THIS_FORM_SHORT=0.01, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/85 X-Sequence-Number: 41537 On Tuesday 07 December 2010 18:34:25 Tom Polak wrote: > Then I did the same test via Postgresql and it took 8.85 seconds! I tried > it again as I thought I did something wrong. I did a few tweaks such as > increasing the shared buffers. Still the best I could get it to was 7.5 > seconds. This is insanely slow compared to MSSQL 2000. What am I missing. > Here is my SQL statement for postgresql: > select name,address,city,state,statename,stateid,other from pgtemp1 left > join pgtemp2 on state=stateid I think you would at least provide the exact schema and possibly some example data (pg_dump) to get us somewhere. I would suggest you post the output of EXPLAIN ANALYZE $yourquery - that gives us information about how that query was executed. Greetings, Andres