Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgoE2-0006mT-9h for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 14:53:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pgoE0-00025j-Of for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 14:53:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgoE0-00025a-GE for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 14:53:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgoDy-00081I-8N for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 14:53:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32RErSR93169907; Mon, 27 Mar 2023 10:53:28 -0400 From: Tom Lane To: maxim.boguk@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time In-reply-to: <17871-16521a70c16cb83c@postgresql.org> References: <17871-16521a70c16cb83c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 27 Mar 2023 08:04:59 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3169905.1679928808.1@sss.pgh.pa.us> Date: Mon, 27 Mar 2023 10:53:28 -0400 Message-ID: <3169906.1679928808@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > 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 Do you see the same discrepancy when you execute EXPLAIN manually on the remote side? If so, I wouldn't blame postgres_fdw for it. I suppose interview_review_info_archive is a view not a plain table? In either case, could we see the DDL definition for it? regards, tom lane