Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 456791337B61 for ; Thu, 16 Dec 2010 11:30:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 23842-06 for ; Thu, 16 Dec 2010 15:29:58 +0000 (UTC) X-Greylist: delayed 00:06:37.130534 by SQLgrey-1.7.6 Received: from 27.mail-out.ovh.net (27.mail-out.ovh.net [91.121.30.210]) by mail.postgresql.org (Postfix) with SMTP id 5435E1337B49 for ; Thu, 16 Dec 2010 11:29:57 -0400 (AST) Received: (qmail 19118 invoked by uid 503); 16 Dec 2010 15:24:48 -0000 Received: from b6.ovh.net (HELO mail434.ha.ovh.net) (213.186.33.56) by 27.mail-out.ovh.net with SMTP; 16 Dec 2010 15:24:41 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 16 Dec 2010 17:22:42 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 16 Dec 2010 17:22:40 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Andy Colson" , "Dan Schaffer" Cc: "Jim Nasby" , pgsql-performance@postgresql.org, "Nick Matheson" Subject: Re: Help with bulk read performance References: <4CCECB69.7080906@noaa.gov> <4D078CD7.7030308@squeakycode.net> <4D07928B.2070907@squeakycode.net> <4D0921D2.2030806@noaa.gov> Date: Thu, 16 Dec 2010 16:22:40 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: <4D0921D2.2030806@noaa.gov> User-Agent: Opera Mail/10.63 (Linux) X-Ovh-Tracer-Id: 3368692521903326848 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201012/198 X-Sequence-Number: 41650 > If the data are stored as a byte array but retrieve into a ResultSet, > the unpacking time goes up by an order of magnitude and the > observed total throughput is 25 MB/s. If the data are stored in a > Postgres float array and unpacked into a byte stream, the > observed throughput is 20 MB/s. float <-> text conversions are very slow, this is in fact due to the mismatch between base-2 (IEEE754) and base-10 (text) floating point representation, which needs very very complex calculations.