Re: [GENERAL] slow inet within cidr query

2006-11-28 Thread Steve Atkins
On Nov 28, 2006, at 12:07 PM, Edwin Grubbs wrote: Under postgres 8.1, the "<<=" comparison yields very slow queries with large tables. I can rewrite the query without the "<<=" operator by generating all 33 possible netmasks (0 through 32) for a given IP. This ugly rewrite runs about 12 ti

Re: [GENERAL] slow inet within cidr query

2006-11-28 Thread Tom Lane
"Edwin Grubbs" <[EMAIL PROTECTED]> writes: > Under postgres 8.1, the "<<=" comparison yields very slow queries with large > tables. <<= isn't optimizable within joins, and really isn't very suited to btree indexes at all. Sometime somebody should try to build a GiST opclass that supports network