From: Georgos Siganos <siganos@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Question about a CIDR based query
Date: Thu, 24 Jun 2004 13:43:08 -0700
Message-ID: <ebba5a930406241343173046c7@mail.gmail.com> (raw)
Hello,
Consider that I have the following table:
Create Table tmp(
route_id int NOT NULL,
route cidr NOT NULL,
Data varchar(100) NOT NULL)
The table contains ~40,000 routes and I have an index on route.
The query I am interested in is:
select * from tmp where route >>= some_cidr
The index on route is not used and I get a sequential scan. The index is
used only for the <<= operator.
Any idea how I can make the query run faster?
Thanks,
George
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: siganos@gmail.com
Subject: Re: Question about a CIDR based query
In-Reply-To: <ebba5a930406241343173046c7@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox