Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
От | Tom Lane |
---|---|
Тема | Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements |
Дата | |
Msg-id | 562.1427499563@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
|
Список | pgsql-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
В списке pgsql-committers по дате отправления: