Re: [HACKERS] pgbench - allow to store select results intovariables - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pgbench - allow to store select results intovariables
Date
Msg-id alpine.DEB.2.21.1901102211350.27692@lancre
Whole thread Raw
In response to Re: [HACKERS] pgbench - allow to store select results into variables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hello Alvaro,

> There's a lot of the new code in pgbench that can be simplified if we
> remove \cset.

I'm not very happy with the resulting syntax, but IMO the feature is 
useful. My initial design was to copy PL/pgSQL "into" with some "\into" 
orthogonal to \; and ;, but the implementation was not especially nice and 
I was told to use psql's \gset approach, which I did.

If we do not provide \cset, then combined queries and getting results are 
not orthogonal, although from a performance testing point of view an 
application could do both, and the point is to allow pgbench to test the 
performance impact of doing that.

There are other existing restrictions which are a arbitrary, eg you cannot 
use prepared with combined. I wish not to add more of this kind of 
restrictions, which are not "up to project standard" in my opinion. I may 
try to remove this particular restriction in the future.

Not many people know that queries can be combined, but if you are 
interested in latency that is really an interesting option, and being able 
to check how much can be gained from doing that is a point of a tool like 
pgbench.

-- 
Fabien.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: MERGE SQL statement for PG12
Next
From: David Rowley
Date:
Subject: Re: speeding up planning with partitions