Re: index on a box

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index on a box
Дата
Msg-id 22953.993162379@sss.pgh.pa.us
обсуждение исходный текст
Ответ на index on a box  (Dustin Sallings <dustin@spy.net>)
Ответы Re: index on a box  (Dustin Sallings <dustin+postgres@spy.net>)
Список pgsql-general
Dustin Sallings <dustin+postgres@spy.net> writes:
> create function box(point) returns box as
>     'select box($1, $1)'
>     language 'sql';

> misc=# explain select * from tmp where box(point(-121, 37)) @ b;
> NOTICE:  QUERY PLAN:

> Seq Scan on tmp  (cost=0.00..2653.01 rows=61 width=92)

You'd better declare the function as 'iscachable'.  As is, the planner
doesn't trust it to return a constant.

            regards, tom lane

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

Предыдущее
От: Dustin Sallings
Дата:
Сообщение: Re: index on a box
Следующее
От: teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Сообщение: Re: postgres 7.0.3 with SuSE 7.1