[HACKERS] pow support for pgbench - Mailing list pgsql-hackers

From Raúl Marín Rodríguez
Subject [HACKERS] pow support for pgbench
Date
Msg-id CAM6_UM4XiA14y9HnDqu9kAAOtwMhHZxW--q_ZACZW9Hsrsf-tg@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] pow support for pgbench
List pgsql-hackers
Hi,

I've written a small patch to add support for pow() in pgbench. 

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.

Regards, 
Raúl Marín Rodríguez

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11