[HACKERS] Index Only Scan support for cube

Поиск
Список
Период
Сортировка
От Andrew Borodin
Тема [HACKERS] Index Only Scan support for cube
Дата
Msg-id CAJEAwVEmONZo_h8Gv4JFeYTtuca1BTvxsQosz6HTaWJx_O0Q-w@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Index Only Scan support for cube
Список pgsql-hackers
Hi, hackers!

Here's a small patch that implements fetch function necessary for
Index Only Scans that use cube data type.
I reuse function g_cube_decompress() instead of creating new function
g_cube_fetch().
Essentially, they both have to detoast data.

How do you think, is it better to create a shallow copy of
g_cube_decompress instead?
Any other suggestions on the functionality?

This

CREATE TABLE SOMECUBES AS SELECT CUBE(X,X+1) C FROM GENERATE_SERIES(1,100) X;
CREATE INDEX SOMECUBES_IDX ON SOMECUBES USING GIST(C);
SET ENABLE_SEQSCAN = FALSE;
EXPLAIN (COSTS OFF ) SELECT C FROM SOMECUBES WHERE C<@CUBE(30,40);

now produces

Index Only Scan using somecubes_idx on somecubes
  Index Cond: (c <@ '(30),(40)'::cube)

instead of

Index Scan using somecubes_idx on somecubes
  Index Cond: (c <@ '(30),(40)'::cube)



Best regards, Andrey Borodin, Octonica.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: tushar
Дата:
Сообщение: [HACKERS] ALTER SUBSCRIPTION ..SET PUBLICATION refresh is notthrowing error.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [HACKERS] Error-like LOG when connecting with SSL for passwordauthentication