Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cb8mr-0002mY-94 for pgsql-sql@arkaria.postgresql.org; Tue, 07 Feb 2017 16:38:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cb8mq-0001Mc-Po for pgsql-sql@arkaria.postgresql.org; Tue, 07 Feb 2017 16:38:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cb8lt-0000IO-KI for pgsql-sql@postgresql.org; Tue, 07 Feb 2017 16:37:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cb8lq-0006Av-W2 for pgsql-sql@postgresql.org; Tue, 07 Feb 2017 16:37:36 +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 v17GbXPL016848; Tue, 7 Feb 2017 11:37:33 -0500 From: Tom Lane To: Herwig Goemans cc: pgsql-sql@postgresql.org Subject: Re: why is PG NOT pushing where clause to VIEW ? Resulting in bad performance. In-reply-to: References: Comments: In-reply-to Herwig Goemans message dated "Tue, 07 Feb 2017 11:53:58 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16846.1486485453.1@sss.pgh.pa.us> Date: Tue, 07 Feb 2017 11:37:33 -0500 Message-ID: <16847.1486485453@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-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Herwig Goemans writes: > I am wondering why a certain query is NOT pushing the where clause to the > view. See query and explain plan: There's no provision for transitively applying IN clauses to other variables. I'm not entirely sure whether it would be a good idea, but in any case, it's not there and not planned. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql