Re: cube_contains and indexing

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: cube_contains and indexing
Дата
Msg-id 20020818122322.GA7589@wolff.to
обсуждение исходный текст
Ответ на Re: cube_contains and indexing  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: cube_contains and indexing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sat, Aug 17, 2002 at 21:02:43 -0400,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
> > I am playing around with the cube extension in contrib and was not able to
> > get cube_contains to use an index. I was able to get (what I believe to be)
> > an equivalent @ operation (cubement containment) to use indexes.
> > So I am either confused about there being a @ equivalent to cube_contains
> > or cube_contains should be an indexable operation but isn't (or at least
> > is harder to get to use an index).
>
> It says here (cube.sql.in) that the @ operator *is* cube_contains.
> Also, AFAICT both @ and ~ (the commutator operator, cube_contained)
> should be equally indexable.  Can you show us your test case?
>
>             regards, tom lane

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)

If this really looks like a problem I can provide more details.
I am running 7.2.1 with the cube package added on.

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

Предыдущее
От: "Cornelia Boenigk"
Дата:
Сообщение: About to update the PostgreSQL-Functions in the PHP Manual
Следующее
От: Alvar Freude
Дата:
Сообщение: BYTEA, indexes and "like"