Re: Optimizer misses big in 10.4 with BRIN index

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: Arcadiy Ivanov <arcadiy(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimizer misses big in 10.4 with BRIN index
Date: 2018-08-09 14:44:05
Message-ID: CAE2gYzwxkaudNt9S5cxSZv1pdcLhJOj4kHbc3p_ASSYZAdsKDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> So I basically spent most of the time trying to create a reproducible case
> and I can say I failed. I can however reproduce this with specific large
> data set with specific data distribution, but not an artificial one.

The query plans posted that has the statistics prefer Bitmap Index
Scan. This is not reproduction of the originally posted case.

> ** Wait... What??? "Rows Removed by Index Recheck: 1643390" but data is
> almost sequential! Let's take a look at it.

I don't think it has anything to do with query planning. Have you
tried "pages_per_range" option of BRIN?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-08-09 15:05:02 libpq should not look up all host addresses at once
Previous Message Cynthia Shang 2018-08-09 14:37:28 Re: Allow COPY's 'text' format to output a header