From: Thomas Kellerer <shammat@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Turn jit off for slow subquery in Postgres 12
Date: Tue, 16 Feb 2021 07:52:09 +0100
Message-ID: <a01f1cd1-4f23-de3e-bb60-fe9c2ecbe807@gmx.net> (raw)
In-Reply-To: <c18b027c-4629-58a5-a499-64dc8a233e8f@hot.ee>
References: <c18b027c-4629-58a5-a499-64dc8a233e8f@hot.ee>
Andrus schrieb am 16.02.2021 um 07:48:
> Last year I posted testcase [1] which shows that using jit makes execution
> magnitude slower ( 2.5s vs 0.4 sec) in typical shopping cart application product search in Postgres 12.
>
> There are also other reports on this [2,3].
>
> I tried to turn jit off for subquery using
>
> select ... from
> (
> set jit to off;
> select ... from cartdata, ... where ....
> set jit to on
> )
>
> But this cause syntax error.
>
> How to turn off jit for specific subquery in Postgres 12?
You can't.
You can only turn off JIT for the whole query (or the session).
In my experience, in OLTP type environments, JIT never improves a query.
We have turned it off globally.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: shammat@gmx.net
Subject: Re: Turn jit off for slow subquery in Postgres 12
In-Reply-To: <a01f1cd1-4f23-de3e-bb60-fe9c2ecbe807@gmx.net>
References: <c18b027c-4629-58a5-a499-64dc8a233e8f@hot.ee> <a01f1cd1-4f23-de3e-bb60-fe9c2ecbe807@gmx.net>
* 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