Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 521D3133655C for ; Sat, 5 Mar 2011 04:01:20 -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 29114-06 for ; Sat, 5 Mar 2011 08:01:13 +0000 (UTC) X-Greylist: delayed 00:06:39.937411 by SQLgrey-1.7.6 Received: from 29.mail-out.ovh.net (29.mail-out.ovh.net [87.98.216.213]) by mail.postgresql.org (Postfix) with SMTP id 213B5133616B for ; Sat, 5 Mar 2011 04:01:11 -0400 (AST) Received: (qmail 4682 invoked by uid 503); 5 Mar 2011 07:54:59 -0000 Received: from b9.ovh.net (HELO mail644.ha.ovh.net) (213.186.33.59) by 29.mail-out.ovh.net with SMTP; 5 Mar 2011 07:54:59 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 5 Mar 2011 09:54:28 +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; 5 Mar 2011 09:54:28 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: pgsql-performance@postgresql.org, Landreville Subject: Re: Calculating 95th percentiles References: Date: Sat, 05 Mar 2011 08:54:27 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: User-Agent: Opera Mail/11.01 (Linux) X-Ovh-Tracer-Id: 17020228892896658993 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: 201103/58 X-Sequence-Number: 42737 > Any time the volume tables are queried it is to calculate the deltas > between each in_octets and out_octets from the previous row (ordered > by timestamp). The delta is used because the external system, where > the data is retrieved from, will roll over the value sometimes. I > have a function to do this calcuation: Would it be possible to do this when inserting and store the deltas directly ?