On Sun, 12 Jun 2022 at 21:14, Dmitry Dolgov <9erthalion6@gmail.com> wrote:
> I've noticed that JIT performance counter generation_counter seems to include
> actions, relevant for both jit_expressions and jit_tuple_deforming options. It
> means one can't directly see what is the influence of jit_tuple_deforming
> alone, which would be helpful when adjusting JIT options. To make it better a
> new counter can be introduced, does it make sense?
I'm not so sure about this idea. As of now, if I look at EXPLAIN
ANALYZE's JIT summary, the individual times add up to the total time.
If we add this deform time, then that's no longer going to be true as
the "Generation" time includes the newly added deform time.
master:
JIT:
Functions: 600
Options: Inlining false, Optimization false, Expressions true, Deforming true
Timing: Generation 37.758 ms, Inlining 0.000 ms, Optimization 6.736
ms, Emission 172.244 ms, Total 216.738 ms
37.758 + 6.736 + 172.244 = 216.738
I think if I was a DBA wondering why JIT was taking so long, I'd
probably either be very astonished or I'd report a bug if I noticed
that all the individual component JIT times didn't add up to the total
time.
I don't think the solution is to subtract the deform time from the
generation time either.
Can't users just get this by looking at EXPLAIN ANALYZE with and
without jit_tuple_deforming?
David