Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id DE6809FB1BD for ; Mon, 9 Oct 2006 18:24:09 -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 91293-07 for ; Mon, 9 Oct 2006 21:23:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 753C59FA5B5 for ; Mon, 9 Oct 2006 18:23:58 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 1658656437; Mon, 9 Oct 2006 16:23:57 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Mon, 9 Oct 2006 16:23:56 -0500 Date: Mon, 9 Oct 2006 16:23:56 -0500 From: "Jim C. Nasby" To: Merlin Moncure Cc: Pg Performance list Subject: Re: odd variances in count(*) times Message-ID: <20061009212355.GM72517@nasby.net> References: <20061009183026.GT24675@kenobi.snowman.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:061009:mmoncure@gmail.com::9wTLGZGluK53zPb7:0000000000000000000 0000000000000000000000000Iyo X-Hashcash: 1:20:061009:pgsql-performance@postgresql.org::6juCo5fpQpDVvQxr:00000 000000000000000000000000Az0k X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/169 X-Sequence-Number: 21298 On Mon, Oct 09, 2006 at 02:41:07PM -0400, Merlin Moncure wrote: > On 10/9/06, Stephen Frost wrote: > >* Merlin Moncure (mmoncure@gmail.com) wrote: > >> 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 > > > >Try w/o the explain analyze. It adds quite a bit of overhead and that > >might be inconsistant between the systems (mainly it may have to do with > >the gettimeofday() calls being implemented differently between Windows > >and Linux..). > > that was it. amd system now drop to .3 seconds, windows .6. (doing > time foo > psql -c bar > file). thanks... You can also turn timing on in psql. And FWIW, RAID5 generally isn't a good idea for databases. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)