PlannerAny session (SET)default on
jit
Allow JIT compilation.
How you change it
Any session (SET)
Defaults and ranges on this page were read from pg_settings on live PostgreSQL 18.4. Treat older majors as needing their own check before you copy a value.
What this means
Enables just-in-time compilation of expressions for queries whose estimated cost crosses jit_above_cost. JIT can speed up long analytic queries that evaluate expressions over millions of rows, but its compilation overhead can make short OLTP queries slower.
When it matters
Leave on for analytic workloads; consider turning off for pure short-transaction OLTP where compilation overhead dominates.
| Default | on |
|---|---|
| Type | bool |
| Change scope | Any session (SET) |
| Category | Planner |
Check the current value
SHOW jit;Tradeoffs
- • Can add latency to cheap queries that get JIT-compiled due to misestimated cost.
- • Helps most on long, CPU-bound analytic scans.
- • If plans regress after an upgrade, testing with jit off is a quick isolation step.