Re: [SQL] Question about a CIDR based query

2004-07-02 Thread George Siganos
Hi Josh, Ok, first the explain analyze June_03=# explain analyze select * from tmp where route >>='62.1.1.0/24'; QUERY PLAN --- Seq Scan on

Re: [SQL] Question about a CIDR based query

2004-06-29 Thread Josh Berkus
George, > Um, no, I need an EXPLAIN ANALYZE, not just an EXPLAIN. Thanks. > > > June_03=# explain select * from tmp where route >>='62.1.1.0/24'; > >QUERY PLAN > > > > Seq Scan on tmp (cost=0.00..606.6

Re: [SQL] Question about a CIDR based query

2004-06-29 Thread Josh Berkus
George, Um, no, I need an EXPLAIN ANALYZE, not just an EXPLAIN. Thanks. > June_03=# explain select * from tmp where route >>='62.1.1.0/24'; >QUERY PLAN > > Seq Scan on tmp (

Re: [SQL] Question about a CIDR based query

2004-06-26 Thread George Siganos
I did a vacuum analyze before I run the following explain June_03=# explain select * from tmp where route >>='62.1.1.0/24'; QUERY PLAN Seq Scan on tmp (cost=0.00..606.60 rows=1

Re: [SQL] Question about a CIDR based query

2004-06-25 Thread Josh Berkus
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 tha

[SQL] Question about a CIDR based query

2004-06-24 Thread Georgos Siganos
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