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 1he1Z8-0005kv-5Q for pgsql-performance@arkaria.postgresql.org; Thu, 20 Jun 2019 18:13:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1he1Z7-00038r-0C for pgsql-performance@arkaria.postgresql.org; Thu, 20 Jun 2019 18:13:41 +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 1he1Z6-00036h-F7 for pgsql-performance@lists.postgresql.org; Thu, 20 Jun 2019 18:13:40 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he1Z3-0007id-Sn for pgsql-performance@postgresql.org; Thu, 20 Jun 2019 18:13:39 +0000 Received: by mail-io1-xd42.google.com with SMTP id u19so207930ior.9 for ; Thu, 20 Jun 2019 11:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yfk0/CascgnVSQbwx89pirwTceRUJytLLnfR9ZwK4JU=; b=G1Mi83FIcULQPAG/ml2vioQ6myiwQa5dLZbpEQ/q2GI93zCVAF52atxufFJ4CyGYoM V+cqEUU4plYeMrPPiufZ6TU4CRM+gzjpojtXGmQ/Azmx04TV9BZQJlGz3drlnIyQPxDR sv1yxYVTi21dBBbx9w/5Cj+KFZvZdPzLAZJh9ykoZT2W2CzZceaUxxCBnTn9FG2rNYdV DzBmbK7K0vhgTkKlzfHNsycaYP1ocAJVp8F/xuxEkJ+DkuO8xzaqYPL3MuiPfUHRq84y Zl0X0Z4nhONmp7+vDz6jcsNzbSxC06R6PrFmtXl+KfHD1MXyvi2MWYe27CVZHCew5B8X 9z2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yfk0/CascgnVSQbwx89pirwTceRUJytLLnfR9ZwK4JU=; b=Q5oPGorAx/vpM4wnTyE7zla1UeqVD4NcPN6o3s79LVuCaETK9egvhX819dbeYUEX1T wxUK9hOZhaY2aHv6HprdnvHuucW6F4WdBycprdGZ4Z2jk1oRTbgbb4OTFUkl0+R8SoK6 W8xhkLsZsjvxZDPwljbpq8wPFRcDZLdU1yMs6fQwwXiQBr5YvDE1/TBmWdMZY/5c7KGD WAPAP8FOOECucwesHami0wfcLKYFZ1ApeBTiTX6GE1cthqTEgL5/eE4ToLioYjSu0F7c 1yEIJpg1fJTWLJn0EdEXXfyJKzRF8OkC/DOiuBMZ1r1O2luHypyIWNPb3XYjKFWAKkd8 iRIg== X-Gm-Message-State: APjAAAW6g0CAz+hXkkEI9z1D+MkYKcsf0sGeaYt4ZHOBisJw6UKXsF92 FgPoZBfB2u6YD190SgTLdrgyGQ== X-Google-Smtp-Source: APXvYqz/uZ5PniBUEz2C3Csh55JR0+Oe/gKVIy7Rq9kUQfZ1rnX/vu2Uido+SFz0lkRxvyrHGdsc5Q== X-Received: by 2002:a6b:b7cf:: with SMTP id h198mr56456223iof.259.1561054417215; Thu, 20 Jun 2019 11:13:37 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z1sm721560ioh.52.2019.06.20.11.13.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 11:13:36 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id CF28F800CF1; Thu, 20 Jun 2019 13:13:35 -0500 (CDT) Date: Thu, 20 Jun 2019 13:13:35 -0500 From: Justin Pryzby To: Michael Lewis Cc: Simon Riggs , Chris Wilson , pgsql-performance@postgresql.org Subject: Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction Message-ID: <20190620181335.GY16019@telsasoft.com> References: <20190620163044.GU16019@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Jun 20, 2019 at 12:09:13PM -0600, Michael Lewis wrote: > For kicks I tried the example given and got the below which seems more > expected. Do you just mean that it ran faster the 2nd time ? Isn't that just due just to cache effects ? Rerun them both back to back. See that the "actual" rowcount of the Index Scan is higher with tigher condition: > -> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.32 rows=14286 width=0) (actual time=0.018..0.019 rows=640 loops=1) > Index Cond: (id >= 90000) > -> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.31 rows=7143 width=0) (actual time=0.026..0.027 rows=1280 loops=1) > Index Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))