[postgis-devel] Issue 95 in postgis: PostGIS 1.4 documentation update

codesite-noreply at google.com codesite-noreply at google.com
Fri Mar 20 09:01:39 PDT 2009


Updates:
	Status: Testing

Comment #12 on issue 95 by ke... at refractions.net: PostGIS 1.4 documentation  
update
http://code.google.com/p/postgis/issues/detail?id=95

I updated the note on operators to reflect the fact the fact that they do  
indeed use
indexes.

However, the caution on the = operator is left as is.  For the life of me,  
I can't
engage the index using this operator no matter what kind of selectivity I  
try for a
large spatial table.

Mark, are you sure that every operator uses indexes? I don't think this one  
does.

CREATE TABLE foo AS
   SELECT st_makepoint(random(), random()) AS the_geom
   FROM generate_series(1, 100000);
CREATE INDEX foo_geom_idx ON foo using gist (the_geom);
ANALYZE foo;
EXPLAIN SELECT * FROM foo WHERE the_geom && 'POINT(0.5 0.5)';
                                      QUERY PLAN
------------------------------------------------------------------------------------
  Index Scan using foo_geom_idx on foo  (cost=0.00..8.29 rows=1 width=84)
    Index Cond: (the_geom  
&& '0101000000000000000000E03F000000000000E03F'::geometry)
(2 rows)

EXPLAIN SELECT * FROM foo WHERE the_geom = 'POINT(0.5 0.5)';
                                   QUERY PLAN
-------------------------------------------------------------------------------
  Seq Scan on foo  (cost=0.00..1839.00 rows=100 width=84)
    Filter: (the_geom  
= '0101000000000000000000E03F000000000000E03F'::geometry)
(2 rows)

-- Kevin

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings



More information about the postgis-devel mailing list