Re: performance of implicit join vs. explicit conditions on inet queries?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: performance of implicit join vs. explicit conditions on inet queries?
Дата
Msg-id 1207.1130905252@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: performance of implicit join vs. explicit conditions on inet queries?  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Список pgsql-performance
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> wrote
>> No, that's completely irrelevant to his problem.  The reason we can't do
>> this is that the transformation from "x << const" to a range check on x
>> is a plan-time transformation; there's no mechanism in place to do it
>> at runtime.

> Not quite understand, sorry ...

> (1) For this query (in an as-is PG syntax, which find out all rectangles lie
> in a given rectangle) :

> SELECT r FROM all_rectangles
>   WHERE r << rectangle('(1,9),(9,1)');

No, you're thinking of the wrong << operator.  The question was about
the inet network inclusion operator.  We have a special case in
indxpath.c to transform "inetcol << inetconstant" into a range check
on the inet variable, much like we can transform a left-anchored LIKE
pattern into a range check on the text variable.

            regards, tom lane

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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: performance of implicit join vs. explicit conditions on inet queries?
Следующее
От: "PostgreSQL"
Дата:
Сообщение: Re: 8.1beta3 performance