Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time

From: Andres Freund <andres(at)anarazel(dot)de>
To: maxim(dot)boguk(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time
Date: 2023-03-27 21:28:30
Message-ID: 20230327212830.dpp2u47je5ozf5q7@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2023-03-27 08:04:59 +0000, PG Bug reporting form wrote:
> postgresql_fdw remote estimated explain calls could trigger JIT compilation
> on the remote side (why explain without analyze trying use JIT at all???),
> and with partitioned tables it will lead to very slow planning.

It should not trigger all of JIT, just generating the bitcode, but not
optimizing / emitting it.

> Checking what's going on the remote side leads to the following results:
> remote estimate explain calls from fdw with jit=on
> [EXPLAIN] LOG: duration: 97.050 ms statement: EXPLAIN SELECT topic_id,
> review_id, move_to_invitation_state_time, no_interview_reply_time,
> review_suggestion_chat_message_creation_time FROM
> public.interview_review_info_archive
> vs
> remote estimate explain calls from fdw with jit=off
> [EXPLAIN] LOG: duration: 3.343 ms statement: EXPLAIN SELECT topic_id,
> review_id, move_to_invitation_state_time, no_interview_reply_time,
> review_suggestion_chat_message_creation_time FROM
> public.interview_review_info_archive

Can you show the explain plan for the remote queries?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-03-27 21:38:19 Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time
Previous Message PG Bug reporting form 2023-03-27 19:17:07 BUG #17873: Empty JSONB array is ordered before all other JSONB values