BRIN is missing in multicolumn indexes documentation
BRIN is missing in multicolumn indexes documentation
Hello, the http://www.postgresql.org/docs/9.5/static/indexes-multicolumn.html page doesn't mention BRIN support, but according to the http://www.postgresql.org/docs/9.5/static/sql-createindex.html it is supported in multicolumn setup. The attached patch (git diff against master branch) fixes the omission and adds "Oxford comma" before "and" to unify the writing style with the style used in the "create index" documentation. Regards, Petr Jediny
Re: BRIN is missing in multicolumn indexes documentation
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Tue, Mar 22, 2016 at 12:53 AM, Petr Jediný wrote: > Hello, > > the http://www.postgresql.org/docs/9.5/static/indexes-multicolumn.html > page doesn't mention BRIN support, but according to the > http://www.postgresql.org/docs/9.5/static/sql-createindex.html it is > supported in multicolumn setup. > > The attached patch (git diff against master branch) fixes the omission > and adds "Oxford comma" before "and" to unify the writing style with > the style used in the "create index" documentation. Good catch! In addtion to your patch, we should add the description for the multicolumn brin index, like the following one in the doc? --------------- A multicolumn GIN index can be used with query conditions that involve any subset of the index's columns. Unlike B-tree or GiST, index search effectiveness is the same regardless of which index column(s) the query conditions use. --------------- Regards, -- Fujii Masao
Re: BRIN is missing in multicolumn indexes documentation
От:
Petr Jediný <petr.jediny@gmail.com>
Дата:
> Good catch! > > In addtion to your patch, we should add the description for > the multicolumn brin index, like the following one in the doc? > > --------------- > A multicolumn GIN index can be used with query conditions that > involve any subset of the index's columns. Unlike B-tree or GiST, > index search effectiveness is the same regardless of which index > column(s) the query conditions use. > --------------- I guess multicolumn BRIN behaves similarly to B-tree or GiST. But I'm no expert, so I need someone knowledgeable to confirm this. If the following wording is OK, I will update the patch. ----- A multicolumn BRIN index can be used with query conditions that involve any subset of the index's columns. Conditions on additional columns restrict the entries returned by the index, but the condition on the first column is the most important one for determining how much of the index needs to be scanned. ----- Regards, PJ
Re: BRIN is missing in multicolumn indexes documentation
От:
Emre Hasegeli <emre@hasegeli.com>
Дата:
> I guess multicolumn BRIN behaves similarly to B-tree or GiST. But I'm > no expert, so I need someone knowledgeable to confirm this. If the > following wording is OK, I will update the patch. Multicolumn BRIN is like GIN. Every column is indexed separately. The order of the columns doesn't matter.
Re: BRIN is missing in multicolumn indexes documentation
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Emre Hasegeli wrote: > > I guess multicolumn BRIN behaves similarly to B-tree or GiST. But I'm > > no expert, so I need someone knowledgeable to confirm this. If the > > following wording is OK, I will update the patch. > > Multicolumn BRIN is like GIN. Every column is indexed separately. > The order of the columns doesn't matter. Right. You can use one index to cover all columns; the position of the column in the index won't matter for a query that uses one column. The only reason to have multiple BRIN indexes on a single table is to have a different pages_per_range. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: BRIN is missing in multicolumn indexes documentation
>> >> Multicolumn BRIN is like GIN. Every column is indexed separately. >> The order of the columns doesn't matter. > > Right. You can use one index to cover all columns; the position of the > column in the index won't matter for a query that uses one column. The > only reason to have multiple BRIN indexes on a single table is to have > a different pages_per_range. Thanks for the information, I've attached the patch updated to v2. PJ
Re: BRIN is missing in multicolumn indexes documentation
От:
Petr Jediný <petr.jediny@gmail.com>
Дата:
Comments? This is my first patch to postgresql project, so comments are very much welcomed. PJ On Wed, Mar 23, 2016 at 8:40 PM, Petr Jediný wrote: >>> >>> Multicolumn BRIN is like GIN. Every column is indexed separately. >>> The order of the columns doesn't matter. >> >> Right. You can use one index to cover all columns; the position of the >> column in the index won't matter for a query that uses one column. The >> only reason to have multiple BRIN indexes on a single table is to have >> a different pages_per_range. > > Thanks for the information, I've attached the patch updated to v2. > > > PJ
Re: BRIN is missing in multicolumn indexes documentation
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Petr Jediný wrote: > Comments? This is my first patch to postgresql project, so comments > are very much welcomed. I think it's fine, so I pushed it. Thanks. I hope you already read this https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services