Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 97ED31337B79 for ; Thu, 4 Nov 2010 11:42:14 -0300 (ADT) 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 22309-04 for ; Thu, 4 Nov 2010 14:42:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rome.boulder.noaa.gov (rome.boulder.noaa.gov [140.172.10.146]) by mail.postgresql.org (Postfix) with ESMTP id 890C2133616B for ; Thu, 4 Nov 2010 11:42:07 -0300 (ADT) Received: from [137.75.201.47] (tripledrop.fsl.noaa.gov [137.75.201.47]) by email.boulder.noaa.gov (iPlanet Messaging Server 5.2 HotFix 2.01 (built Aug 26 2004)) with ESMTPA id <0LBD0047T7I8JZ@email.boulder.noaa.gov> for pgsql-performance@postgresql.org; Thu, 04 Nov 2010 14:42:08 +0000 (GMT) Date: Thu, 04 Nov 2010 14:42:08 +0000 From: Nick Matheson Subject: Re: Simple (hopefully) throughput question? In-reply-to: <4CD19E84.7070204@squeakycode.net> To: lists@peufeu.com Cc: pgsql-performance@postgresql.org Message-id: <4CD2C640.8030303@noaa.gov> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.24 (X11/20101005) References: <4CD1853F.2010800@noaa.gov> <4CD19E84.7070204@squeakycode.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/37 X-Sequence-Number: 41061 Pierre- 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... I think your comments really get at what our working hypothesis was, but given that our experience is limited compared to you all here on the mailing lists we really wanted to make sure we weren't missing any alternatives. Also the writing of custom aggregators will likely leverage any improvements we make to our storage throughput. Thanks, Nick