From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Surjective functional indexes |
Date: | 2018-03-23 16:17:03 |
Message-ID: | abaef102-e7a2-f86a-6df9-c6d92b65d989@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 23.03.2018 18:45, Alvaro Herrera wrote:
> Konstantin Knizhnik wrote:
>
>> rd_projidx is not a list, it is Bitmapset. It is just one of many bitmap
>> sets in RelationData:
> Yes, but the other bitmapsets are of AttrNumber of the involved column.
> They new one is of list_nth() counters for items in the index list.
> That seems weird and it scares me -- do we use that coding pattern
> elsewhere? Maybe use an array of OIDs instead?
>
Using list or array instead of bitmap requires much more space...
And bitmaps are much more efficient for many operations: check for
element presence, combine, intersect,...
Check in bitmap has O(0) complexity so iterating through list of all
indexes or attributes with bitmap check doesn't add any essential overhead.
Sorry, I do not understand this: "They new one is of list_nth() counters
for items in the index list"
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Sitnikov | 2018-03-23 16:18:52 | Backend memory dump analysis |
Previous Message | Teodor Sigaev | 2018-03-23 16:14:42 | Re: PATCH: Exclude unlogged tables from base backups |