Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E74509FB7F1 for ; Mon, 9 Oct 2006 15:30:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 74859-01 for ; Mon, 9 Oct 2006 15:30:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from kenobi.snowman.net (kenobi.snowman.net [70.84.9.186]) by postgresql.org (Postfix) with ESMTP id 5E3909FB7E4 for ; Mon, 9 Oct 2006 15:30:27 -0300 (ADT) Received: by kenobi.snowman.net (Postfix, from userid 1000) id E88055800D; Mon, 9 Oct 2006 13:30:26 -0500 (CDT) Date: Mon, 9 Oct 2006 14:30:26 -0400 From: Stephen Frost To: Merlin Moncure Cc: Pg Performance list Subject: Re: odd variances in count(*) times Message-ID: <20061009183026.GT24675@kenobi.snowman.net> Mail-Followup-To: Merlin Moncure , Pg Performance list References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C4w+P/iLza328BeY" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.16-2-vserver-686 (i686) X-Uptime: 14:29:10 up 21 days, 18:38, 21 users, load average: 0.11, 0.11, 0.10 User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.042 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/163 X-Sequence-Number: 21292 --C4w+P/iLza328BeY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Merlin Moncure (mmoncure@gmail.com) wrote: > explain analyze select 5000!; > A: 2.4 seconds > B: 1.8 seconds >=20 > 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..). Thanks, Stephen --C4w+P/iLza328BeY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD4DBQFFKpVCrzgMPqB3kigRAiaJAJiJ+Z8QvhVKIMppTl8I2ptHuPmYAJ4o0+js 2mpvIGPFyS7Xs9H3IShmmw== =ggNy -----END PGP SIGNATURE----- --C4w+P/iLza328BeY--