From: Josh Berkus <josh@agliodbs.com>
To: Georgos Siganos <siganos@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Question about a CIDR based query
Date: Fri, 25 Jun 2004 09:00:08 -0700
Message-ID: <200406250900.08312.josh@agliodbs.com> (raw)
In-Reply-To: <ebba5a930406241343173046c7@mail.gmail.com>
References: <ebba5a930406241343173046c7@mail.gmail.com>
Georgos,
> select * from tmp where route >>= some_cidr
Can you post an EXPLAIN ANALYZE for this? And when's the last time you ran
ANALYZE on the table?
> The index on route is not used and I get a sequential scan. The index is
> used only for the <<= operator.
Most likely Postgres thinks that the >>= query is returning 60% of your table,
which makes indexes useless.
--
Josh Berkus
Aglio Database Solutions
San Francisco
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: josh@agliodbs.com, siganos@gmail.com
Subject: Re: Question about a CIDR based query
In-Reply-To: <200406250900.08312.josh@agliodbs.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