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

2005-11-01 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > "Tom Lane" <[EMAIL PROTECTED]> 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 t

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

2005-11-01 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> 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. This is not easy to fix

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

2005-10-31 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > "Robert Edmonds" <[EMAIL PROTECTED]> wrote >> Instead of specifying explicit address ranges in the query, I'd like >> to store the ranges in a table: > Good illustration. I guess we have a problem of the historgram statistical > information. No, that

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

2005-10-31 Thread Qingqing Zhou
"Robert Edmonds" <[EMAIL PROTECTED]> wrote > > EXPLAIN ANALYZE > SELECT * > FROM inet_addresses > WHERE addr << inet('10.2.0.0/24') >OR addr << inet('10.4.0.0/24') >OR addr << inet('10.8.0.0/24'); > > Bitmap Heap Scan on inet_addresses (cost=6.51..324.48 rows=1792335 > width=11) (actual