Re: Add parameter jit_warn_above_fraction - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add parameter jit_warn_above_fraction
Date
Msg-id 20220329231641.ai3qrzpdo2vqvwix@alap3.anarazel.de
Whole thread Raw
In response to Re: Add parameter jit_warn_above_fraction  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Add parameter jit_warn_above_fraction
List pgsql-hackers
Hi,

On 2022-03-30 09:05:44 +1300, David Rowley wrote:
> I really believe that the main problem here is that JIT only enables
> when the *total* plan cost reaches a certain threshold.

Yes, that is/was a clear design mistake. It wasn't quite as bad back when it
was written - partitioning blows the problem up by an order of magnitude or
three. . The costing really needs to at least multiply the number of
to-be-compiled expressions with some cost to decide whether the cost of JITing
is worth it, rather than making "flat" decision.


> I did propose a patch to address this in [1]. It does need more work
> and I do plan to come back to it for v16.

FWIW, that doesn't seem quite right - won't it stop JITing e.g. on the inner
side of a nested loop, just because it's cheap, even though that's where the
bulk of the benefits comes from?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
Next
From: Jacob Champion
Date:
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers