From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | John Naylor <john(dot)naylor(at)2ndquadrant(dot)com> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: BRIN multi-range indexes |
Date: | 2020-09-09 18:40:41 |
Message-ID: | 20200909184041.GA3829@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-Sep-09, John Naylor wrote:
> create index on t using brin (a);
> CREATE INDEX
> Time: 1631.452 ms (00:01.631)
> create index on t using brin (a int8_minmax_multi_ops);
> CREATE INDEX
> Time: 6521.026 ms (00:06.521)
It seems strange that the multi-minmax index takes so much longer to
build. I wonder if there's some obvious part of the algorithm that can
be improved?
> The second thing is, with parallel seq scan, the query is faster than
> a BRIN bitmap scan, with this pathological data distribution, but the
> planner won't choose it unless forced to:
>
> set enable_bitmapscan = 'off';
> explain analyze select * from t
> where a between 1923300::int and 1923600::int;
This is probably explained by the fact that you likely have the whole
table in shared buffers, or at least in OS cache. I'm not sure if the
costing should necessarily account for this.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-09-09 18:42:41 | Re: Inconsistent Japanese name order in v13 contributors list |
Previous Message | Tom Lane | 2020-09-09 18:29:16 | Re: Remove line length restriction in passwordFromFile() |