Re: inet <<= and indexes - Mailing list pgsql-general

From Tom Lane
Subject Re: inet <<= and indexes
Date
Msg-id 12247.1028692020@sss.pgh.pa.us
Whole thread Raw
In response to inet <<= and indexes  (Edwin Grubbs <egrubbs@rackspace.com>)
Responses Re: inet <<= and indexes  (The Doctor What <docwhat@gerf.org>)
List pgsql-general
Edwin Grubbs <egrubbs@rackspace.com> writes:
> I have a table with about 60,000 ips, and postgres will use the index to
> find the ips in a subnet if I type in a literal cidr block
> (e.g. address <<= '99.88.5.0'), but it will not use the index if the cidr
> block is in a variable (e.g. address <<= block).

Yup, the present implementation of that optimization depends on having
a constant to compare to.  Sorry ...

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: COPY
Next
From: Patrick Nelson
Date:
Subject: Importing blob