Re: GSoC proposal. Index-only scans for GIST

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: GSoC proposal. Index-only scans for GIST
Дата
Msg-id CAPpHfdsHNxYxEue+5bNJXu8JR2HD9iA4Pu71J3ozemSdvNuJeg@mail.gmail.com
обсуждение исходный текст
Ответ на GSoC proposal. Index-only scans for GIST  (Anastasia Lubennikova <lubennikovaav@gmail.com>)
Список pgsql-hackers
On Tue, Mar 18, 2014 at 5:12 PM, Anastasia Lubennikova <lubennikovaav@gmail.com> wrote:

2. gistget algorithm (several parts omitted):

Check the key
gistindex_keytest() – does this index tuple satisfy the scan key(s)?

Scan all items on the GiST index page and insert them into the queue (or directly to output areas)

plain scan

Heap tuple TIDs are returned into so->pageData[]

ordered scan

Heap tuple TIDs are pushed into individual search queue items

If the fetch() is specified by the developer, then using it, algorithm can retrieve the data directly to output areas at this stage, without reference to the heap.


I think there are following changes to be made to GiST code:
1) When next consistent IndexTuple is found extract original Datums using "fetch" method.
2) Put those original Datums to queue.
3) When returning next ItemPointer from queue put original Datums to IndexScanDesc (into xs_itup).

3. Create function gistcanreturn to check whether fetch() is specified by user.

Amcanreturn – Function to check whether index supports index-only scans, or zero if none

There is the question of support index-only scans for multicolumn indexes. Probably it would require extend the interface to add separate columns checking.

To solve this question I need the community’s help.


4. Add details for index only scans into gistcostestimate function


Also, another part of work to be mentioned is to implement fetch function for all suitable opclasses.

----
With best regards,
Alexander Korotkov.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Wiki Page Draft for upcoming release
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Portability issues in shm_mq