Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn6q0-0001IH-Dy for pgsql-performance@arkaria.postgresql.org; Thu, 22 Sep 2016 16:27:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bn6pz-0005e3-VL for pgsql-performance@arkaria.postgresql.org; Thu, 22 Sep 2016 16:27:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bn6oK-0003it-M1 for pgsql-performance@postgresql.org; Thu, 22 Sep 2016 16:25:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bn6oH-0008Lp-43 for pgsql-performance@postgresql.org; Thu, 22 Sep 2016 16:25:20 +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 u8MGPF39027196; Thu, 22 Sep 2016 12:25:15 -0400 From: Tom Lane To: Mike Broers cc: pgsql-performance@postgresql.org Subject: Re: query against single partition uses index, against master table does seq scan In-reply-to: References: <24073.1474510287@sss.pgh.pa.us> Comments: In-reply-to Mike Broers message dated "Wed, 21 Sep 2016 23:09:12 -0500" Date: Thu, 22 Sep 2016 12:25:15 -0400 Message-ID: <27195.1474561515@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) 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 Mike Broers writes: > This is 9.5, sorry I didnt mention that in the initial post. Hmm, that's odd then. > I am guessing the issue is that the secondary non-indexed criteria is a > search through a jsonb column? Doubt it; it should have considered the plan you are thinking of anyway. Maybe it did, but threw it away on some bogus cost estimate. If you could produce a self-contained test case, I'd be willing to take a look. 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