Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 410EE9FB7C7 for ; Mon, 9 Oct 2006 15:22:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 23057-08 for ; Mon, 9 Oct 2006 18:20:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 6B8439FB7CC for ; Mon, 9 Oct 2006 15:17:26 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id 30so623561ugc for ; Mon, 09 Oct 2006 11:17:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=fEYuGqQL0ZRsPPrczbV+7UJF/2ZxaolXhFFZPzFK8qf2mmCCOaBkfjdSPz5bJMKtH9JYhIPNGVdvAS4NmI66eBFa0PaJwdWgJOy2Eswx0l8IR/AiQaxPoKOrf5Y3THmRa34Sd2R5X1pSR1bEQV1ten4sPF7E8JgnM4epb8OsxeQ= Received: by 10.78.150.7 with SMTP id x7mr5465037hud; Mon, 09 Oct 2006 11:17:24 -0700 (PDT) Received: by 10.78.35.18 with HTTP; Mon, 9 Oct 2006 11:17:24 -0700 (PDT) Message-ID: Date: Mon, 9 Oct 2006 14:17:24 -0400 From: "Merlin Moncure" To: "Pg Performance list" Subject: odd variances in count(*) times MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/162 X-Sequence-Number: 21291 I have two systems running 8.2beta1 getting strange difference of results in count(*). Query that illistrates the difference is count(*). this is a synthetic test i use to measure a sytems's cpu performance. System A: 2.2 ghz p4 northwood, HT win xp vanilla sata (1 disk) System B: amd 64 3700+ linux cent/os 4.4 32 bit 4 raptors, raid 5, 3ware explain analyze select 5000!; A: 2.4 seconds B: 1.8 seconds explain analyze select count(*) from generate_series(1,500000); A: 0.85 seconds B: 4.94 seconds Both systems have a freshly minted database. By all resepcts I would expect B to outperform A on most cpu bound tests with a faster processor and linux kernel. memory is not an issue here, varying the size of the count(*) does not effect the results, A is always 5x faster than B. the only two variables i see are cpu and o/s. Also tested on pg 8.1, results are same except pg 8.2 is about 10% faster on both systems for count(*). (yay!) :-) anybody think of anything obvious? should i profile? (windows mingw profiling sucks) merlin