Re: inet <<= and indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Edwin Grubbs <egrubbs(at)rackspace(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: inet <<= and indexes
Date: 2002-08-07 03:47:00
Message-ID: 12247.1028692020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Edwin Grubbs <egrubbs(at)rackspace(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trey Ackerman 2002-08-07 05:03:55 looking to speed up SELECT ... LEFT JOIN query
Previous Message Joel Joseph 2002-08-07 02:26:45 working with arrays question