Re: WIP: BRIN multi-range indexes
John Naylor <john.naylor@enterprisedb.com>
From: John Naylor <john.naylor@enterprisedb.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-09T14:46:41Z
Lists: pgsql-hackers
On Wed, Feb 3, 2021 at 7:54 PM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote: > > [v-20210203] Hi Tomas, I have some random comments from reading the patch, but haven't gone into detail in the newer aspects. I'll do so in the near future. The cfbot seems to crash on this patch during make check, but it doesn't crash for me. I'm not even sure what date that cfbot status is from. > BLOOM > ----- Looks good, but make sure you change the commit message -- it still refers to sorted mode. + * not entirely clear how to distrubute the space between those columns. s/distrubute/distribute/ > MINMAX-MULTI > ------------ > c) 0007 - A hybrid approach, using a buffer that is multiple of the > user-specified value, with some safety min/max limits. IMO this is what > we should use, although perhaps with some tuning of the exact limits. That seems like a good approach. +#include "access/hash.h" /* XXX strange that it fails because of BRIN_AM_OID without this */ I think you want #include "catalog/pg_am.h" here. > Attached is a spreadsheet with benchmark results for each of those three > approaches, on different data types (byval/byref), data set types, index > parameters (pages/values per range) etc. I think 0007 is a reasonable > compromise overall, with performance somewhere in betwen 0005 and 0006. > Of course, there are cases where it's somewhat slow, e.g. for data types > with expensive comparisons and data sets forcing frequent compactions, > in which case it's ~10x slower compared to regular minmax (in most cases > it's ~1.5x). Compared to btree, it's usually much faster - ~2-3x as fast > (except for some extreme cases, of course). > > > As for the opclasses for indexes without "natural" distance function, > implemented in 0008, I think we should drop it. In theory it works, but Sounds reasonable. > The other thing we were considering was using the new multi-minmax > opclasses as default ones, replacing the existing minmax ones. IMHO we > shouldn't do that either. For existing minmax indexes that's useless > (the opclass seems to be working, otherwise the index would be dropped). > But even for new indexes I'm not sure it's the right thing, so I don't > plan to change this. Okay. -- John Naylor EDB: http://www.enterprisedb.com
Commits
-
BRIN minmax-multi indexes
- ab596105b55f 14.0 landed
-
BRIN bloom indexes
- 77b88cd1bb90 14.0 landed
-
Support the old signature of BRIN consistent function
- a681e3c107aa 14.0 landed
-
Remove unnecessary pg_amproc BRIN minmax entries
- a68dfa27d42f 14.0 landed
-
Optimize allocations in bringetbitmap
- 8e4b332e88b8 14.0 landed
-
Move IS [NOT] NULL handling from BRIN support functions
- 72ccf55cb99c 14.0 landed
-
Pass all scan keys to BRIN consistent function at once
- a1c649d889bd 14.0 landed
-
Properly detoast data in brin_form_tuple
- d2d3a4bd33d2 9.5.24 landed
- bae31e75f777 9.6.20 landed
- 0b96fc977c5b 10.15 landed
- 895d0f0e8218 11.10 landed
- 8149e9f9a0d6 12.5 landed
- 6a7b55f3716f 13.1 landed
- 7577dd84807a 14.0 landed