From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-hackers@lists.postgresql.org
Subject: Query is over 2x slower with jit=on
Date: Wed, 18 Apr 2018 17:35:31 +0200 (CEST)
Message-ID: <VisenaEmail.24.e60072a07f006130.162d95c3e17@tc7-visena> (raw)
Hi all.
I don't know whether this is expected or not but I'm experiencing over 2x
slowdown on a large query in PG-11 with JIT=on.
(query is a prepared statement executed with "explain analyze execute
myprepared(arg1, arg2, ..., argn)")
After 10 executions these are the results (the first 5 executed in > 16s, then
the plan changed)
With jit=on:
https://explain.depesz.com/s/vYB
Planning Time: 0.336 ms
JIT:
Functions: 716
Generation Time: 78.404 ms
Inlining: false
Inlining Time: 0.000 ms
Optimization: false
Optimization Time: 43.916 ms
Emission Time: 600.031 ms
Execution Time: 2035.150 ms
(385 rows)
With jit=off:
https://explain.depesz.com/s/X6mA
Planning Time: 0.371 ms
Execution Time: 833.941 ms
(377 rows)
Both are master as of 55d26ff638f063fbccf57843f2c27f9795895a5c
The query largely consists of CTEs with aggregation which are FULL OUTER
JOIN'ed.
On v10 the query executes in:
Execution time: 1159.628 ms
So v11 (with jit=off) is about 25% faster (due to parallel hash-join I think),
which is nice!
What's the deal with jit making it slower?
--
Andreas Joseph Krogh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andreas@visena.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Query is over 2x slower with jit=on
In-Reply-To: <VisenaEmail.24.e60072a07f006130.162d95c3e17@tc7-visena>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox