Re: pow support for pgbench

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Raúl Marín Rodríguez <rmrodriguez(at)carto(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: pow support for pgbench
Date: 2017-10-30 10:54:24
Message-ID: CAB7nPqS_9UcMs_n0dyVQHkXhAuky_dW3p1Q8KMJEHAkDHjxaOg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 27, 2017 at 4:51 PM, Raúl Marín Rodríguez
<rmrodriguez(at)carto(dot)com> wrote:
> I've written a small patch to add support for pow() in pgbench.

Cool.

> The main reason behind it is that I'm currently using a shell call to do it
> which takes between 2-10 ms that can be a big percentage of the time taken
> by the whole transaction. For example (shortened):
>
> latency average = 11.718 ms
> - statement latencies in milliseconds:
> 2.834 \setshell POWER2 awk 'BEGIN {p=2^ARGV[1]; print p }'
> :ZOOM_CURRENT
> 8.846 SELECT
> ST_AsBinary(ST_Simplify(ST_SnapToGrid("the_geom_webmercator",:SNAP),
> :SIMPLIFY)) AS geom FROM
>
> I've also updated the related docs and added some tests. Please let me know
> if I'm missing anything.

Please add this patch to the upcoming commit fest if you would like to
get some feedback:
https://commitfest.postgresql.org/15/

I am adding as well Fabien in CC who worked in getting the internal
function infrastructure in the shape it is now (waaay better) with
commit 86c43f4.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2017-10-30 10:56:20 Re: An unlikely() experiment
Previous Message Michael Paquier 2017-10-30 10:36:06 Re: WIP: Restricting pg_rewind to data/wal dirs