Search Postgresql Archives

index issues with generate_series.....or why this index os not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings!!

I'm not sure why the query is not using the gist index in the table
base.parishes. Any suggestions?
______________________________________________
CREATE TABLE base.parishes
(
  gid serial NOT NULL,
  parish text,
  "COUNT" integer,
  "SUM_AREA" double precision,
  "SUM_ELECTO" double precision,
  the_geom geometry,
  CONSTRAINT parishes_pkey PRIMARY KEY (gid),
  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3448)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.parishes OWNER TO postgres;

-- Index: base.gfd7ir67uftyujrth7ji68t678jttyrdgd

-- DROP INDEX base.gfd7ir67uftyujrth7ji68t678jttyrdgd;

CREATE INDEX gfd7ir67uftyujrth7ji68t678jttyrdgd
  ON base.parishes
  USING gist
  (the_geom);
______________________________________________


The query:
______________________________________________
with mnme as (
	select generate_series(600000,840000,2) mn, 	generate_series(610000,710000,2)me
	),
points as
	(select st_makepoint(mn,me), parish from mnme inner join
base.parishes on
st_intersects(setsrid(st_makepoint(mn,me),3448),the_geom))

select * from points
______________________________________________

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux