Re: Query is over 2x slower with jit=on

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, amitdkhan(dot)pg(at)gmail(dot)com, Andreas Joseph Krogh <andreas(at)visena(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Query is over 2x slower with jit=on
Date: 2018-09-20 03:54:43
Message-ID: CAFj8pRAv8o_yJVKShgaFm44-W9M+P0=C+ExA6tjP6qVGHmLCPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

čt 20. 9. 2018 v 5:39 odesílatel Andres Freund <andres(at)anarazel(dot)de> napsal:

> On 2018-09-19 23:26:52 -0400, Tom Lane wrote:
> > Andres Freund <andres(at)anarazel(dot)de> writes:
> > > On 2018-09-17 17:50:15 -0400, Tom Lane wrote:
> > >> Just to throw a contrarian opinion into this: I find the current
> EXPLAIN
> > >> output for JIT to be insanely verbose already.
> >
> > > Hm, it'd have been nice to get that feedback a little bit earlier, I
> did
> > > inquire...
> >
> > > Currently:
> >
> > > JIT:
> > > Functions: 2
> > > Generation Time: 0.680 ms
> > > Inlining: true
> > > Inlining Time: 7.591 ms
> > > Optimization: true
> > > Optimization Time: 20.522 ms
> > > Emission Time: 14.607 ms
> >
> > Just to clarify, that seems perfectly fine for the "machine readable"
> > output formats. I'd just like fewer lines in the "human readable"
> > output.
>
> Yea, I do think that's a fair complaint.
>
>
> > > How about making that:
> >
> > > JIT:
> > > Functions: 2
>
> FWIW, not that I want to do that now, but at some point it might make
> sense to sub-divide this into things like number of "expressions",
> "tuple deforming", "plans", ... Just mentioning that if somebody wants
> to comment on reformatting this as well, if we're tinkering anyway.
>
>
> > > Options: Inlining, Optimization
> > > Times (Total, Generation, Inlining, Optimization, Emission): 43.4
> ms, 0.680 ms, 7.591 ms, 20.522 ms, 14.607 ms
>

+1

Pavel

> >
> > > or something similar?
> >
> > That's going in the right direction. Personally I'd make the last line
> > more like
> >
> > Times: generation 0.680 ms, inlining 7.591 ms, optimization 20.522
> ms, emission 14.607 ms, total 43.4 ms
>
> Yea, that's probably easier to read.
>
>
> > (total at the end seems more natural to me, YMMV).
>
> I kind of think doing it first is best, because that's usually the first
> thing one wants to know.
>
>
> > Also, the "options" format you suggest here seems a bit too biased
> > towards binary on/off options --- what happens when there's a
> > three-way option? So maybe that line should be like
> >
> > Options: inlining on, optimization on
> >
> > though I'm less sure about that part.
>
> I'm pretty certain you're right :). There's already arguments around
> making optimization more gradual (akin to O1,2,3).
>
> Greetings,
>
> Andres Freund
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hubert Zhang 2018-09-20 04:08:11 How to get active table within a transaction.
Previous Message Laurenz Albe 2018-09-20 03:51:20 Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi