Re: WIP: BRIN bloom indexes

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: BRIN bloom indexes
Date: 2017-10-27 09:25:50
Message-ID: d95f5bce-0a12-9b9b-8a86-151488e744c3@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

On 10/27/2017 09:34 AM, Simon Riggs wrote:
> On 27 October 2017 at 07:20, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Thu, Oct 19, 2017 at 10:15 PM, Tomas Vondra
>> <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>>> Let's see a query like this:
>>>
>>> select * from bloom_test
>>> where id = '8db1d4a6-31a6-e9a2-4e2c-0e842e1f1772';
>>>
>>> The minmax index produces this plan
>>>
>>> Heap Blocks: lossy=2061856
>>> Execution time: 22707.891 ms
>>>
>>> Now, the bloom index:
>>>
>>> Heap Blocks: lossy=25984
>>> Execution time: 338.946 ms
>>
>> It's neat to see BRIN being extended like this. Possibly we could
>> consider making it a contrib module rather than including it in core,
>> although I don't have strong feelings about it.
>
> I see that SP-GIST includes two operator classes in core, one default.
>
> Makes sense to do the same thing with BRIN and add this new op class
> as a non-default option in core.
>

Not sure "a number of in-core opclasses" is a good reason to (not) add
new ones. Also, we already have two built-in BRIN opclasses (minmax and
inclusion).

In general, "BRIN bloom" can be packed as a contrib module (at least I
believe so). That's not the case for the "BRIN multi-range" which also
requires some changes to some code in brin.c (but the rest can be moved
to contrib module, of course).

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Szymon Lipiński 2017-10-27 09:33:45 Re: MERGE SQL Statement for PG11
Previous Message Tomas Vondra 2017-10-27 09:12:27 Re: Burst in WAL size when UUID is used as PK while full_page_writes are enabled