<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,i´m from argentina, so excuse my english. <br>
My problem is i have a table with 500000 record,polygons and points
type <span id="result_box" class=""><span
 style="background-color: rgb(255, 255, 255);" title="">and i have to
find objects which intersects with an boundary in particular</span></span><br>
<br>
Example of ,my query<br>
select * from zone where  geometry @ (select geometry from othertable
where id=1) <br>
<br>
My table definition:<br>
CREATE TABLE "zone"<br>
(<br>
  zoneid integer NOT NULL DEFAULT nextval('zonas_id_seq'::regclass),<br>
  "name" text,<br>
  buffer integer,<br>
  description text,<br>
  layerid integer,<br>
  geometry geometry,<br>
  color integer,<br>
  CONSTRAINT zone_pk PRIMARY KEY (zoneid),<br>
  CONSTRAINT enforce_dims_geometry CHECK (st_ndims(geometry) = 2),<br>
  CONSTRAINT enforce_srid_geometry CHECK (st_srid(geometry) = 4326)<br>
)<br>
WITH (<br>
  OIDS=FALSE<br>
);<br>
ALTER TABLE "zone" OWNER TO postgres;<br>
<br>
-- Index: idx_zone_geometry<br>
<br>
-- DROP INDEX idx_zone_geometry;<br>
<br>
CREATE INDEX idx_zone_geometry<br>
  ON "zone"<br>
  USING gist<br>
  (geometry);<br>
<br>
-- Index: idx_zone_zoneid<br>
<br>
-- DROP INDEX idx_zone_zoneid;<br>
<br>
CREATE INDEX idx_zone_zoneid<br>
  ON "zone"<br>
  USING btree<br>
  (zoneid);<br>
<br>
I  have test of differents ways to accelerate my query with other
functions like st_distance,st_dwithin,etc<br>
but do not know which to use<br>
<br>
Thanks<br>
 <br>
<br>
</body>
</html>

<table><tr><td bgcolor=#ffffff><font color=#000000><pre>Disclaimer:

This email and any attachments thereof may contain confidential, privileged, proprietary, or otherwise private information. This email is intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient of the email and its attachments please inform the sender immediately and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any way and delete this e-mail and its attachments from your system. Any views or opinions expressed are solely those of the author.</pre></font></td></tr></table>