[postgis-users] GiST Index

Matthew Pulis mpulis at gmail.com
Wed Feb 27 02:49:07 PST 2008


Hei all :)


I have a table where it holds 2 Geometry type columns, this_geom, and


I will be using this table as a reference table where I will either pass
thisgid or this_geom and would like all the other data extracted.


However an EXPLAIN SELECT on a where this_geom =


Gave me :


"Seq Scan on streets_relation  (cost=0.00..4666.80 rows=45 width=758)"

"  Filter: (this_geom =


Why rows does not equal to 1 but to 45?


Does a GiST index in groups of 45? Can it be minimised to less groups


This is the CREATE Table SQL text used :


-- Table: streets_relation


-- DROP TABLE streets_relation;


CREATE TABLE streets_relation


  last_geom geometry,

  x_last double precision,

  y_last double precision,

  z_last double precision,

  lastid integer NOT NULL,

  stseg bigint,

  lastname character varying(80),

  this_geom geometry,

  x_this double precision,

  y_this double precision,

  z_this double precision,

  x_new double precision,

  y_new double precision,

  z_new double precision,

  thisname character varying(80),

  thisgid integer NOT NULL,

  CONSTRAINT "Primarky Key GID" PRIMARY KEY (lastid, thisgid)



ALTER TABLE streets_relation OWNER TO yancho;



-- Index: "This Geom"


-- DROP INDEX "This Geom";



  ON streets_relation

  USING gist




When I did where thisgid = 10 this is the result I got :


"Index Scan using "Primarky Key GID" on streets_relation  (cost=0.00..284.19
rows=1 width=758)"

"  Index Cond: (thisgid = 10)"


Any idea on what I can do to improve the performance please?


Thanks and regards





I am using the free version of SPAMfighter for private users.
It has removed 23646 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter <http://www.spamfighter.com/len>  for free now!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080227/637bfb08/attachment.html>

More information about the postgis-users mailing list