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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Qingqing Zhou" <zhouqq@xxxxxxxxxxxxxx> writes:
> "Tom Lane" <tgl@xxxxxxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux