Re: Question about a CIDR based query

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Georgos Siganos <siganos(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Question about a CIDR based query
Date: 2004-06-25 16:00:08
Message-ID: 200406250900.08312.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jaime Casanova 2004-06-25 18:28:56 Re: feature request ?
Previous Message Markus Bertheau 2004-06-25 15:12:43 Re: question about which column(s) are the right foreign key