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 1jVdhz-00063c-P8 for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2020 16:12:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVdhy-0002bP-Bi for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2020 16:12:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVdhy-0002ax-4N for pgsql-performance@lists.postgresql.org; Mon, 04 May 2020 16:12:42 +0000 Received: from facteur.thefreecat.org ([212.129.38.6]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVdhu-0001QB-Tk for pgsql-performance@lists.postgresql.org; Mon, 04 May 2020 16:12:40 +0000 Received: from [192.168.1.38] ([::ffff:92.152.85.21]) (AUTH: LOGIN cat, SSL: TLS1.2,128bits,ECDHE_RSA_AES_128_GCM_SHA256) by facteur.thefreecat.org with ESMTPSA; Mon, 04 May 2020 18:12:32 +0200 id 0000000009DC0778.000000005EB03EF0.00007031 Subject: Re: Recursive query slow on strange conditions To: pgsql-performance@lists.postgresql.org References: <4a3b0246-f3ef-0767-62d1-6ceb4e2fc09c@thefreecat.org> From: Jean-Christophe Boggio Message-ID: <644c5b7f-aa5e-66bd-defa-e56a80bd9781@thefreecat.org> Date: Mon, 4 May 2020 18:12:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <4a3b0246-f3ef-0767-62d1-6ceb4e2fc09c@thefreecat.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, I have rewritten the function/query to make it a PLPGSQL function and split the query in ~20 smaller queries. Now the problem of the JIT compiler kicking in also happens on PG 11.6 Although the 2 seconds induced delay is not a serious problem when I execute the query for thousands of items, it really becomes one when querying ONE item. Is there a way to disable JIT (I use the apt.postgresql.org repository) in both 11.6 and 12.2 ? I would have liked to disable it on this particular query but maybe I could live with disabling JIT everywhere. Thanks for your help, JC