Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdPwi-0002hr-84 for pgsql-performance@arkaria.postgresql.org; Sun, 30 Dec 2018 01:31:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdPwg-0003bm-Qs for pgsql-performance@arkaria.postgresql.org; Sun, 30 Dec 2018 01:31:14 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdPwg-0003bf-JM for pgsql-performance@lists.postgresql.org; Sun, 30 Dec 2018 01:31:14 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdPwd-0007Ew-Rb for pgsql-performance@postgresql.org; Sun, 30 Dec 2018 01:31:13 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id AC02A111B9F8B for ; Sat, 29 Dec 2018 18:31:10 -0700 (MST) Date: Sat, 29 Dec 2018 18:31:10 -0700 (MST) From: Jim Finnerty To: pgsql-performance@postgresql.org Message-ID: <1546133470666-0.post@n3.nabble.com> In-Reply-To: <1546133109941-0.post@n3.nabble.com> References: <1546133109941-0.post@n3.nabble.com> Subject: Re: Need help with optimising simple query MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ...on second thought, the placement of the IS NULL predicate isn't quite right, but if you futz with it a bit I think you can make it work ----- Jim Finnerty, AWS, Amazon Aurora PostgreSQL -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html