pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
Date: Fri, 27 Mar 2015 19:39:23 -0400
Message-ID: <562.1427499563@sss.pgh.pa.us> (raw)
In-Reply-To: <5515D932.8020305@dunslane.net>
References: <E1YbaFW-0008VB-AD@gemulon.postgresql.org>
	<26457.1427493201@sss.pgh.pa.us>
	<5515D932.8020305@dunslane.net>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Andrew Dunstan <andrew@dunslane.net> writes:
> However, it is moaning about the code in the sqrtd() function. I'm 
> wondering if we shouldn't just rip that out and use the library sqrt() 
> function. It's not called for every statement processed, only each time 
> the function is called (for each row).

[ looks... ]  +1.  I'm skeptical that that's even a win at all on modern
hardware; sqrt() is a primitive operation on nearly anything these days.

Also, quite aside from the error of supposing that long long int is
the same size as double, I'm pretty sure this would fail miserably on
non-IEEE-float hardware; and it may well have endianness issues too.
Since the code isn't actually being executed on the buildfarm, only
compiled, we have no good way to tell whether it would produce sane
results everywhere.

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (6+ messages)  latest in thread

Message-ID: <562.1427499563@sss.pgh.pa.us>
Permalink:  ../562.1427499563@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/562.1427499563@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net
  Subject: Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
  In-Reply-To: <562.1427499563@sss.pgh.pa.us>
  References: <E1YbaFW-0008VB-AD@gemulon.postgresql.org> <26457.1427493201@sss.pgh.pa.us> <5515D932.8020305@dunslane.net> <562.1427499563@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox