Re: bad JIT decision - Mailing list pgsql-general

From Andres Freund
Subject Re: bad JIT decision
Date
Msg-id 20200727230007.rpknq77f7aaiufq2@alap3.anarazel.de
Whole thread Raw
In response to Re: bad JIT decision  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bad JIT decision
List pgsql-general
Hi,

On 2020-07-25 10:54:18 -0400, Tom Lane wrote:
> David Rowley <dgrowleyml@gmail.com> writes:
> > ... nested at the bottom level join, about 6 joins deep.  The lack of
> > any row being found results in upper level joins not having to do
> > anything, and the majority of the plan is (never executed).
> 
> On re-reading this, that last point struck me forcibly.  If most of
> the plan never gets executed, could we avoid compiling it?  That is,
> maybe JIT isn't JIT enough, and we should make compilation happen
> at first use of an expression not during executor startup.

That unfortunately has its own downsides, in that there's significant
overhead of emitting code multiple times. I suspect that taking the
cost of all the JIT emissions together into account is the more
promising approach.

Greetings,

Andres Freund



pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: bad JIT decision
Next
From: Alvaro Herrera
Date:
Subject: Re: bad JIT decision