Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3684B1336DB6 for ; Thu, 4 Nov 2010 06:12:23 -0300 (ADT) 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 84217-07 for ; Thu, 4 Nov 2010 09:12:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 31.mail-out.ovh.net (31.mail-out.ovh.net [213.186.62.10]) by mail.postgresql.org (Postfix) with SMTP id B8E3713364DE for ; Thu, 4 Nov 2010 06:12:15 -0300 (ADT) Received: (qmail 2568 invoked by uid 503); 4 Nov 2010 09:34:40 -0000 Received: from b7.ovh.net (HELO mail34.ha.ovh.net) (213.186.33.57) by 31.mail-out.ovh.net with SMTP; 4 Nov 2010 09:34:40 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 4 Nov 2010 11:12:13 +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; 4 Nov 2010 11:12:12 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: pgsql-performance@postgresql.org, "Nick Matheson" Subject: Re: Simple (hopefully) throughput question? References: <4CD1853F.2010800@noaa.gov> Date: Thu, 04 Nov 2010 10:12:11 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: <4CD1853F.2010800@noaa.gov> User-Agent: Opera Mail/10.62 (Linux) X-Ovh-Tracer-Id: 8713339380815758897 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: 201011/33 X-Sequence-Number: 41057 > Is there any way using stored procedures (maybe C code that calls > SPI directly) or some other approach to get close to the expected 35 > MB/s doing these bulk reads? Or is this the price we have to pay for > using SQL instead of some NoSQL solution. (We actually tried Tokyo > Cabinet and found it to perform quite well. However it does not measure > up to Postgres in terms of replication, data interrogation, community > support, acceptance, etc). Reading from the tables is very fast, what bites you is that postgres has to convert the data to wire format, send it to the client, and the client has to decode it and convert it to a format usable by your application. Writing a custom aggregate in C should be a lot faster since it has direct access to the data itself. The code path from actual table data to an aggregate is much shorter than from table data to the client...