Fix BRIN cost estimation
Alvaro Herrera <alvherre@alvh.no-ip.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/brin/brin.c | modified | +21 −0 |
| src/backend/utils/adt/selfuncs.c | modified | +171 −26 |
| src/include/access/brin.h | modified | +14 −0 |
| src/test/regress/expected/brin.out | modified | +26 −0 |
| src/test/regress/sql/brin.sql | modified | +16 −0 |
Discussion
- BRIN cost estimate 21 messages · 2015-11-16 → 2017-04-06