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 1iJJPp-00067w-FO for pgsql-performance@arkaria.postgresql.org; Sat, 12 Oct 2019 15:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iJJOp-0006Vo-HP for pgsql-performance@arkaria.postgresql.org; Sat, 12 Oct 2019 15:33:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJJOp-0006VS-4P for pgsql-performance@lists.postgresql.org; Sat, 12 Oct 2019 15:33:43 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iJJOn-0000jM-2E for pgsql-performance@postgresql.org; Sat, 12 Oct 2019 15:33:41 +0000 Received: from [192.168.127.1] (port=25367 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1iJJOj-0009MD-TN; Sat, 12 Oct 2019 15:33:37 +0000 Received: from localhost ([127.0.0.1]:56793 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1iJJOj-0009H3-Or; Sat, 12 Oct 2019 15:33:37 +0000 From: Andrew Gierth To: MichaelDBA Cc: Jeff Janes , Justin Pryzby , Ivan Voras , postgres performance list Subject: Re: Optimising a two column OR check In-Reply-To: (MichaelDBA@sqlexec.com's message of "Sat, 12 Oct 2019 11:27:55 -0400") Message-ID: <87y2xqvv1x.fsf@news-spur.riddles.org.uk> References: <20191012144336.GA4475@telsasoft.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Date: Sat, 12 Oct 2019 16:33:37 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "MichaelDBA" == MichaelDBA writes: MichaelDBA> BTW, to Andrew, the UNION ALL alternative still results in MichaelDBA> bitmap index scans from my testing. You probably forgot to vacuum the table. -- Andrew (irc:RhodiumToad)