Re: Best way to scan on-disk bitmaps - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Best way to scan on-disk bitmaps
Date
Msg-id 42889CD1.6070001@sigaev.ru
Whole thread Raw
In response to Re: Best way to scan on-disk bitmaps  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Best way to scan on-disk bitmaps
Re: Best way to scan on-disk bitmaps
List pgsql-hackers
About page splitting algorithm in GiST in multikey case. For the beginning, page 
is splitted by calling pickSplit method of key of first column (pickSplit method 
is defined for opclass and it is a user function), then it try to find equal 
values  of first column in left and right pages ( gist.c lines 1264-1901 ). If 
it is, then GiST core will try to resort tuples with first equal keys between 
left and right pages using penalty method for second and higher column's key. If 
it's not, it leave pages untouched. But unions for parent page of second and 
higher column's keys will be formed.

So, if index is defined as 'using gist (a,b,c)' then, in principle, GiST index 
can speed up queries like 'a=V1 and c=V2'.  But it will not usable for queries 
( b=V3 and c=V2 ). By the way, instead of '=' operation may be used other 
operations. Number of supported operations by GiST is indefinite unlike, for 
example, btree which supported only five: <, <=, =, =>, >.



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Cost of XLogInsert CRC calculations
Next
From: Greg Stark
Date:
Subject: Re: bitmap scans, btree scans, and tid order