
When PostgreSQL JIT Costs More Than the Query: Measuring Compile Time on Short Queries
A PostgreSQL query that runs in 11 ms spent 119 ms end to end, 108 of them compiling it with LLVM JIT. A reproducible experiment on PostgreSQL 16, 17 and 18: where the cost thresholds sit, what each tier costs, and how to switch it off at the right scope.




