Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D1BEF1337B68 for ; Thu, 13 Jan 2011 06:18:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 56376-06 for ; Thu, 13 Jan 2011 10:17:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id A2CB21337B67 for ; Thu, 13 Jan 2011 06:17:55 -0400 (AST) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p0DAHsh6089231 for ; Thu, 13 Jan 2011 12:17:54 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p0DAHrNP089229 for pgsql-admin@postgresql.org; Thu, 13 Jan 2011 12:17:53 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: Postgresql 9.0.2 explain analyze very slow (10x), compared to actual query time Date: Thu, 13 Jan 2011 12:17:52 +0200 User-Agent: KMail/1.9.7 References: <201101111753.22602.achill@matrix.gatewaynet.com> <201101121817.11143.achill@matrix.gatewaynet.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201101131217.53575.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.451 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_BRBL_LASTEXT=1.449 X-Spam-Level: X-Archive-Number: 201101/65 X-Sequence-Number: 36505 =D3=F4=E9=F2 Wednesday 12 January 2011 21:17:00 =EF/=E7 Alex Hunsaker =DD= =E3=F1=E1=F8=E5: > 2011/1/12 Achilleas Mantzios : >=20 > > > > Changed that to smth like: micros_total =3D micros_total + (double) mic= ros; > > instead of the printf to beat any compiler optimization, and still linu= x runs at light speed: > > FBSD_TEST : user 0.089s, sys 1.4s > > FBSD_DEV : user 0.183s, sys 3.8s > > LINUX_PROD : user 0.168s, sys 0s > > (regarding that gettimeofday is a syscall in FreeBSD, and that sys time= is 0 for linux, makes me think some optimization is being done) >=20 > At least on x86_64, linux will use a vsyscall (v for virtual) for > gettimeofday which does not actually need to enter/exit the kernel. > That probably explains a large part of the speed difference here. >=20 Thanx, thats the ARCH (x86_64) of our linux system. =2D-=20 Achilleas Mantzios