Re: bad JIT decision - Mailing list pgsql-general

From Tom Lane
Subject Re: bad JIT decision
Date
Msg-id 672183.1595686994@sss.pgh.pa.us
Whole thread Raw
In response to Re: bad JIT decision  (Andres Freund <andres@anarazel.de>)
Responses Re: bad JIT decision
List pgsql-general
Andres Freund <andres@anarazel.de> writes:
> On 2020-07-24 18:37:02 -0400, Tom Lane wrote:
>> Yeah.  I'm fairly convinced that the v12 defaults are far too low,
>> because we are constantly seeing complaints of this sort.

> I think the issue is more that we need to take into accoutn that the
> overhead of JITing scales ~linearly with the number of JITed
> expressions. And that's not done right now.  I've had a patch somewhere
> that had a prototype implementation of changing the costing to be
> #expressions * some_cost, and I think that's a lot more accurate.

Another thing we could try with much less effort is scaling it by the
number of relations in the query.  There's already some code in the
plancache that tries to estimate planning effort that way, IIRC.
Such a scaling would be very legitimate for the cost of compiling
tuple-deconstruction code, and for other expressions it'd kind of
amount to an assumption that the expressions-per-table ratio is
roughly constant.  If you don't like that, maybe some simple
nonlinear growth rule would work.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: bad JIT decision
Next
From: Tom Lane
Date:
Subject: Re: bad JIT decision