Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WQgSf-0000oD-Ie for pgsql-performance@arkaria.postgresql.org; Thu, 20 Mar 2014 17:08:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WQgSe-0004xJ-Ug for pgsql-performance@arkaria.postgresql.org; Thu, 20 Mar 2014 17:08:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WQgSd-0004xC-Lj for pgsql-performance@postgresql.org; Thu, 20 Mar 2014 17:08:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WQgSa-0007vr-6k for pgsql-performance@postgresql.org; Thu, 20 Mar 2014 17:08:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2KH8o2C015607; Thu, 20 Mar 2014 13:08:50 -0400 From: Tom Lane To: Stefan Keller cc: "pgsql-performance@postgresql.org" Subject: Re: Getting query plan alternatives from query planner? In-reply-to: References: Comments: In-reply-to Stefan Keller message dated "Thu, 20 Mar 2014 17:53:58 +0100" Date: Thu, 20 Mar 2014 13:08:50 -0400 Message-ID: <15606.1395335330@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Stefan Keller writes: > I'd like to know from the query planner which query plan alternatives > have been generated and rejected. Is this possible? No, not really. People have occasionally hacked the planner to print rejected paths before they're discarded, but there's no convenient way to do anything except send the data to the postmaster log, which isn't all that convenient. A bigger problem is that people who are asking for this typically imagine that the planner generates complete plans before rejecting them; which it does not. Path alternatives are rejected whenever possible before moving up to the next join level, so that what we have rejected is actually just a plan fragment in most cases. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance