Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time
Date
Msg-id 20230327212830.dpp2u47je5ozf5q7@awork3.anarazel.de
Whole thread Raw
In response to BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17873: Empty JSONB array is ordered before all other JSONB values
Next
From: Tom Lane
Date:
Subject: Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time