]> granicus.if.org Git - postgresql/commit
Fix BRIN cost estimation
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 6 Apr 2017 20:49:26 +0000 (17:49 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 6 Apr 2017 20:51:53 +0000 (17:51 -0300)
commit7e534adcdc70866e7be74d626b0ed067c890a251
tree609e0b65eb10538fdaa787fc29dee9655a6da710
parentb2ff37d43cc81348fd8e9d9c5fcc9dfadf790763
Fix BRIN cost estimation

The original code was overly optimistic about the cost of scanning a
BRIN index, leading to BRIN indexes being selected when they'd be a
worse choice than some other index.  This complete rewrite should be
more accurate.

Author: David Rowley, based on an earlier patch by Emre Hasegeli
Reviewed-by: Emre Hasegeli
Discussion: https://postgr.es/m/CAKJS1f9n-Wapop5Xz1dtGdpdqmzeGqQK4sV2MK-zZugfC14Xtw@mail.gmail.com
src/backend/access/brin/brin.c
src/backend/utils/adt/selfuncs.c
src/include/access/brin.h
src/test/regress/expected/brin.out
src/test/regress/sql/brin.sql