Re: Question about a CIDR based query - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Question about a CIDR based query
Date
Msg-id 200406250900.08312.josh@agliodbs.com
Whole thread Raw
In response to Question about a CIDR based query  (Georgos Siganos <siganos@gmail.com>)
List 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


pgsql-sql by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: question about which column(s) are the right foreign key
Next
From: Jaime Casanova
Date:
Subject: Re: feature request ?