X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 94DA2528BC for ; Tue, 24 May 2005 03:47:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45695-02 for ; Tue, 24 May 2005 06:47:38 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id 0335C528A7 for ; Tue, 24 May 2005 03:47:38 -0300 (ADT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 23F9818D141; Tue, 24 May 2005 02:47:39 -0400 (EDT) Received: from mailbox.samurai.com ([205.207.28.82]) by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024) with LMTP id 57047-01; Tue, 24 May 2005 02:47:37 -0400 (EDT) Received: from [61.88.101.19] (unknown [61.88.101.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailbox.samurai.com (Postfix) with ESMTP id 871A618D091; Tue, 24 May 2005 02:47:36 -0400 (EDT) Message-ID: <4292CE03.1070605@samurai.com> Date: Tue, 24 May 2005 16:47:31 +1000 From: Neil Conway User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mark durrant Cc: pgsql-performance@postgresql.org Subject: Re: Select performance vs. mssql References: <20050524064034.18213.qmail@web53105.mail.yahoo.com> In-Reply-To: <20050524064034.18213.qmail@web53105.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailbox.samurai.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.021 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/356 X-Sequence-Number: 12520 mark durrant wrote: > PostgreSQL Machine: > "Aggregate (cost=140122.56..140122.56 rows=1 width=0) > (actual time=24516.000..24516.000 rows=1 loops=1)" > " -> Index Scan using "day" on mtable > (cost=0.00..140035.06 rows=35000 width=0) (actual > time=47.000..21841.000 rows=1166025 loops=1)" > " Index Cond: ("day" = 'Mon'::bpchar)" > "Total runtime: 24516.000 ms" Have you run ANALYZE? Clustering the table on the "day" index (via the CLUSTER command) would be worth trying. -Neil