Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvEcC-00Adws-Tz for pgsql-general@arkaria.postgresql.org; Fri, 12 Apr 2024 10:58:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rvEcC-00CqgP-3G for pgsql-general@arkaria.postgresql.org; Fri, 12 Apr 2024 10:58:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvEcB-00CqgH-PM for pgsql-general@lists.postgresql.org; Fri, 12 Apr 2024 10:58:39 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rvEc9-002UoN-9N for pgsql-general@lists.postgresql.org; Fri, 12 Apr 2024 10:58:38 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5176f217b7bso1343023e87.0 for ; Fri, 12 Apr 2024 03:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712919515; x=1713524315; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6QEZKi9FwZXbE2Hk3hSyfMdyfm86iYz0J6uZrlCK2mo=; b=dKNsO3b7uJMe48yX764rPN86pbLNOYlQin0wO0YoQnpLqJlPdRMw8VrRmF3eHtXtEF ZZ6BJB2YoCTlwaj3b+paI5eRQx1ulyAgJrTO0dLibhSFB0gyHX7ZCDEB+SrHhvyYsXkd JIVelunfGZRfWIwzkcxfJjzz84xMQqQec6UoR0IwHlmKAvcWK2yJ6aqziwCN4t4wMPak f4z5j3SbPOE3/PJ6b3tYJnRkTMO//Yc7m9Y30dgK2mI/rLU8oH8yvS7JyGmlsF+A/LRN E4ODUyL65lG5ZRWLnDh8cwHo5EUMw04Y7d1LOmj+8sqccLjkpeMO1y+BwdJZDyCIcSZD ioNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712919515; x=1713524315; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6QEZKi9FwZXbE2Hk3hSyfMdyfm86iYz0J6uZrlCK2mo=; b=wPEFPtYHwcCSOEX31W+BD15riWGkaNGPnz0ogiDAEC5ZUUahgnkFEQik0Fy0wSB/1r ikfQ+helwJATRDidVQ/0VJLqRi10VrUCLbUfApPrd88N0kE2TsFdTuGtjl78AWlMw+8s 1iVotYItM6foa+tVUQRIOAzvyTPohdRGpnxa8s6/ij86uQqcqKIEOTlJYtnJtLdImkqx mv4g9TEOUFI4jVS3eXzheiF2fpB/dqBb6ssEX1Jp3WH31j8+KNfZYWwxn02Tph6yCsno LkWC3w5IQ12mOpstHnMkUMVm++cHe3nPj4iSk8Quh5x+GlFi3DkfI2AIZkHgiqgRUczX 7d6A== X-Gm-Message-State: AOJu0YxcOIvnXJffyMVDcnjGJjWRGyDXuU8cOq0rhw8763luR8/RIBGa qjZaOLs9wHBv3oVqoNi9fNRq8GZmAgU2iRwZkcIHKNjF3byr+XEjwCy7ochlwHHxzG7IbTAf5iI b3rEQI6RKWW1IiotLU6vApiREWRxS4Q== X-Google-Smtp-Source: AGHT+IFWY982Px0D625uFzkTcUkBhrCZUmdpJ3b7Z4G5+6AUvOfEFSsXLs+lJU4upkNy9dNixH53lUB89eK00NwlrKk= X-Received: by 2002:ac2:55a7:0:b0:518:70eb:99eb with SMTP id y7-20020ac255a7000000b0051870eb99ebmr1892144lfg.31.1712919514567; Fri, 12 Apr 2024 03:58:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 12 Apr 2024 22:58:22 +1200 Message-ID: Subject: Re: effect on planner of turning a subquery to a table, sql function returning table To: Thierry Henrio Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 12 Apr 2024 at 22:33, Thierry Henrio wrote: > Here is (B) execution plan: To be able to determine if a plan is good or bad, we'd really need to see the EXPLAIN (ANALYZE) output rather than just the EXPLAIN ouput. To save a possible roundtrip; SET track_io_timing = ON; EXPLAIN (ANALYZE, BUFFERS) David