Re: cube_contains and indexing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cube_contains and indexing
Дата
Msg-id 24268.1029689919@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cube_contains and indexing  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: cube_contains and indexing  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
>> It says here (cube.sql.in) that the @ operator *is* cube_contains.

> A short example is:
> cube=> explain select col1 from c where cube_contains('(-78,39),(-77,40)',col1);NOTICE:  QUERY PLAN:

> Seq Scan on c  (cost=0.00..369.30 rows=6195 width=24)

> EXPLAIN
> cube=> explain select col1 from c where '(-78,39),(-77,40)' @ col1;
> NOTICE:  QUERY PLAN:

> Index Scan using c_index on c  (cost=0.00..71.87 rows=19 width=24)

Well, yeah.  Indexes work with operators, not with functions.  This is
a consequence of decisions taken a decade ago at Berkeley: the system
catalogs that show what indexes can do connect *operators* to indexes,
not functions to indexes.  Use the operator.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: pg_query & pg_last_oid
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: cube_contains and indexing