<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [postgis-users] Large geometry issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Will do -- thanks for the suggestion.<BR>
<BR>
Greg W.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-users-bounces@postgis.refractions.net on behalf of Mark Leslie<BR>
Sent: Fri 7/6/2007 2:15 PM<BR>
To: PostGIS Users Discussion<BR>
Subject: Re: [postgis-users] Large geometry issue<BR>
<BR>
Greg,<BR>
I've noticed that you're using a Geos release candidate.&nbsp; I've tried<BR>
this query against PostGIS 1.2.1 with the official Geos 3.0.0 and was<BR>
given the 241 results for my trouble.&nbsp; Are you able to upgrade the Geos<BR>
on that machine and give it a try?<BR>
Mark<BR>
<BR>
Gregory Williamson wrote:<BR>
&gt; I think the zipped file I first sent should have all of that data ... this was a test against the original full tables but I have reproduced it against the smaller sample, which has all of the small tiles with the bounding box of the large geometry.<BR>
&gt;<BR>
&gt; Using the intersection in JUMP seems to come up with a number very similar to using the distance(x,y) = 0 test; a rough count by hand seems to believe the 241 count.<BR>
&gt;<BR>
&gt; I can resend the data if need be; let me know if there is any other info I can provide ... maybe we have a busted build ? Both servers are postgres 8.2.4 on slightly different flavors of linux.<BR>
&gt;<BR>
&gt; Thanks!<BR>
&gt;<BR>
&gt; Greg W.<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: postgis-users-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR>
&gt; Sent: Thu 7/5/2007 10:29 PM<BR>
&gt; To: PostGIS Users Discussion<BR>
&gt; Cc: Mark Leslie<BR>
&gt; Subject: Re: [postgis-users] Large geometry issue<BR>
&gt;&nbsp;<BR>
&gt; That is indeed concerning, can you send us the big shape and a few of&nbsp;<BR>
&gt; the small shapes that 2.2.3 is turning up as containments and 3.0.0&nbsp;<BR>
&gt; is not?<BR>
&gt;<BR>
&gt; P<BR>
&gt;<BR>
&gt; On 5-Jul-07, at 6:11 PM, Gregory Williamson wrote:<BR>
&gt;<BR>
&gt;&gt; Having has a little time to look at this in detail I can see why&nbsp;<BR>
&gt;&gt; this is ugly ... a very long sinuous shape vs a ton of small&nbsp;<BR>
&gt;&gt; rectangles, so the bounding box does get a lot of candidates which&nbsp;<BR>
&gt;&gt; then have to be winnowed.<BR>
&gt;&gt;<BR>
&gt;&gt; I do find myself wondering at this result:<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp; POSTGIS=&quot;1.2.1&quot; GEOS=&quot;3.0.0rc4-CAPI-1.3.3&quot; USE_STATS<BR>
&gt;&gt; select count(*) from wsc_candidates w, oli_req x WHERE w.geometry&nbsp;<BR>
&gt;&gt; &amp;&amp; x.bbox AND contains(x.oli_req_geom,w.geometry) AND x.oli_req_id&nbsp;<BR>
&gt;&gt; = 114672;<BR>
&gt;&gt;&nbsp; count<BR>
&gt;&gt; -------<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<BR>
&gt;&gt; (1 row)<BR>
&gt;&gt;<BR>
&gt;&gt; Time: 4347.776 ms<BR>
&gt;&gt;<BR>
&gt;&gt; versus<BR>
&gt;&gt; POSTGIS=&quot;1.2.1&quot; GEOS=&quot;2.2.3-CAPI-1.1.1&quot; PROJ=&quot;Rel. 4.4.9, 29 Oct&nbsp;<BR>
&gt;&gt; 2004&quot; USE_STATS<BR>
&gt;&gt; # select count(*) from wsc_candidates w, oli_req x WHERE w.geometry&nbsp;<BR>
&gt;&gt; &amp;&amp; x.bbox AND contains(x.oli_req_geom,w.geometry) AND x.oli_req_id&nbsp;<BR>
&gt;&gt; = 114672;<BR>
&gt;&gt;&nbsp; count<BR>
&gt;&gt; -------<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp; 241<BR>
&gt;&gt; (1 row)<BR>
&gt;&gt;<BR>
&gt;&gt; Time: 15956.425 ms<BR>
&gt;&gt;<BR>
&gt;&gt; Not the time so much -- the box is a bit older -- but the disparity&nbsp;<BR>
&gt;&gt; in rows. 241 seems more likely from eyeballing the data in JUMP ...&nbsp;<BR>
&gt;&gt; or have I overlooked something obvious ?<BR>
&gt;&gt;<BR>
&gt;&gt; Thanks,<BR>
&gt;&gt;<BR>
&gt;&gt; Greg W.<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; -----Original Message-----<BR>
&gt;&gt; From: postgis-users-bounces@postgis.refractions.net on behalf of&nbsp;<BR>
&gt;&gt; Martin Davis<BR>
&gt;&gt; Sent: Thu 7/5/2007 5:32 PM<BR>
&gt;&gt; To: PostGIS Users Discussion<BR>
&gt;&gt; Subject: Re: [postgis-users] Large geometry issue<BR>
&gt;&gt;<BR>
&gt;&gt; No problem.&nbsp; Actually it's me being blind - I just saw the attachment<BR>
&gt;&gt; with the test data.<BR>
&gt;&gt;<BR>
&gt;&gt; 2530 vertices isn't a very big polygon.&nbsp; So this isn't a problem with<BR>
&gt;&gt; lots of holes or shells, it simply reveals that we're not&nbsp;<BR>
&gt;&gt; extracting the<BR>
&gt;&gt; maximum possible performance from a querying involving comparing many<BR>
&gt;&gt; small geoms against a single large one.&nbsp; Stay tuned - hopefully we'll<BR>
&gt;&gt; have a better story for this shortly.<BR>
&gt;&gt;<BR>
&gt;&gt; Martin<BR>
&gt;&gt;<BR>
&gt;&gt; Gregory Williamson wrote:<BR>
&gt;&gt;&gt; Martin,<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Sorry for the lack of coherence -- 2530 vertices in this test&nbsp;<BR>
&gt;&gt; polygon<BR>
&gt;&gt;&gt; ... it should be in the original posting I sent, an attached zip&nbsp;<BR>
&gt;&gt; file<BR>
&gt;&gt;&gt; with two tables; this is the single entry in the oli_req table. The<BR>
&gt;&gt;&gt; other table has some 13000 rows of polygons which are either<BR>
&gt;&gt;&gt; completely within or overlapping with the large poly.<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; If you can't get at that let me know and I'll send you a copy ...<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Greg W.<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; -----Original Message-----<BR>
&gt;&gt;&gt; From: postgis-users-bounces@postgis.refractions.net on behalf of<BR>
&gt;&gt;&gt; Martin Davis<BR>
&gt;&gt;&gt; Sent: Thu 7/5/2007 5:09 PM<BR>
&gt;&gt;&gt; To: PostGIS Users Discussion<BR>
&gt;&gt;&gt; Subject: Re: [postgis-users] Large geometry issue<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Greg,<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Can you elaborate on your statement &quot;2530 in a sinlge polygon&quot;?&nbsp;&nbsp;<BR>
&gt;&gt; Do you<BR>
&gt;&gt;&gt; mean holes or subPolygons in a MultiPolygon?<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Either way, currently JTS is not optimized for working with very&nbsp;<BR>
&gt;&gt; large<BR>
&gt;&gt;&gt; numbers of holes and sub-polygons.&nbsp; As Paul says, we are currently<BR>
&gt;&gt;&gt; working on improving this.&nbsp; Hopefully we can at least match the<BR>
&gt;&gt;&gt; performance of the Other DMBS(es) for this situation!<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Would it be possible for me to obtain this geometry for testing?<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Martin<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Gregory Williamson wrote:<BR>
&gt;&gt;&gt;&gt; Dear peoples,<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; I have a problem with a query that uses an absurdly large geometry<BR>
&gt;&gt;&gt;&gt; (2530 in a single polygon). This is srid -1 (part of a large&nbsp;<BR>
&gt;&gt; test of<BR>
&gt;&gt;&gt;&gt; postgres vs some other database product). Everything has been&nbsp;<BR>
&gt;&gt; vacuumed<BR>
&gt;&gt;&gt;&gt; and analyzed.<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; The initial search to find candidates in a target table is&nbsp;<BR>
&gt;&gt; quite fast:<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wtm_sub_cell w, order_line_item x&nbsp;<BR>
&gt;&gt; WHERE<BR>
&gt;&gt;&gt;&gt; x.bbox &amp;&amp; w.geometry AND x.id_as_int = 114672;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp; 13168<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 9.472 ms<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Trying to get the list narrowed to geometries that are completely<BR>
&gt;&gt;&gt;&gt; contained by the requested shape is slow:<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wtm_sub_cell w, order_line_item x&nbsp;<BR>
&gt;&gt; WHERE<BR>
&gt;&gt;&gt;&gt; x.bbox &amp;&amp; w.geometry AND distance(x.geometry,w.geometry) = 0 and<BR>
&gt;&gt;&gt;&gt; x.id_as_int = 114672;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp; 1112<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 69277.780 ms<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; So I have two questions:<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp; a) anything better to use than &quot;distance(x,y) = 0) ? I tried<BR>
&gt;&gt;&gt;&gt; st_within -- it is about the same speed but returns no polys,&nbsp;<BR>
&gt;&gt; which is<BR>
&gt;&gt;&gt;&gt; strange to me, but I also haven't looked at these in detail&nbsp;<BR>
&gt;&gt; yet. For<BR>
&gt;&gt;&gt;&gt; example:<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wtm_sub_cell w, order_line_item x&nbsp;<BR>
&gt;&gt; WHERE<BR>
&gt;&gt;&gt;&gt; x.bbox &amp;&amp; w.geometry AND st_within(x.geometry,w.geometry) and<BR>
&gt;&gt;&gt;&gt; x.id_as_int = 114672;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 1173.185 ms<BR>
&gt;&gt;&gt;&gt; (same results with st_within(w.geometry,x.geometry):<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wtm_sub_cell w, order_line_item x&nbsp;<BR>
&gt;&gt; WHERE<BR>
&gt;&gt;&gt;&gt; x.bbox &amp;&amp; w.geometry AND st_within(w.geometry,x.geometry) and<BR>
&gt;&gt;&gt;&gt; x.id_as_int = 114672;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp; b) anything I can do to speed things up ? I have tried&nbsp;<BR>
&gt;&gt; boosting work<BR>
&gt;&gt;&gt;&gt; mem to 16 megs (from 1) and it made no apparent difference.<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; I have a self contained test case that shows the same behavior&nbsp;<BR>
&gt;&gt; -- the<BR>
&gt;&gt;&gt;&gt; one large poly and all the candidates in another table.&nbsp;<BR>
&gt;&gt; Apologies for<BR>
&gt;&gt;&gt;&gt; the size; hopefully it's not been mangled in the transfers.<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Explain analyze of the sample (the sequential is sensible since&nbsp;<BR>
&gt;&gt; there<BR>
&gt;&gt;&gt;&gt; is only one row in the table):<BR>
&gt;&gt;&gt;&gt; catest=# explain analyze select count(*) from wsc_candidates w,<BR>
&gt;&gt;&gt;&gt; oli_req x WHERE w.geometry &amp;&amp; x.bbox AND<BR>
&gt;&gt;&gt;&gt; distance(w.geometry,x.oli_req_geom) &gt; 0 AND x.oli_req_id = 114672;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; QUERY PLAN<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&nbsp;<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt; -----------<BR>
&gt;&gt;&gt;&gt;&nbsp; Aggregate&nbsp; (cost=20.28..20.29 rows=1 width=0) (actual<BR>
&gt;&gt;&gt;&gt; time=77232.858..77232.859 rows=1 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Nested Loop&nbsp; (cost=0.00..9.30 rows=4389 width=0) (actual<BR>
&gt;&gt;&gt;&gt; time=6.389..77221.506 rows=12056 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Join Filter: (distance(w.geometry, x.oli_req_geom) &gt;<BR>
&gt;&gt;&gt;&gt; 0::double precision)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Seq Scan on oli_req x&nbsp; (cost=0.00..1.01 rows=1<BR>
&gt;&gt;&gt;&gt; width=40602) (actual time=0.007..0.009 rows=1 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filter: (oli_req_id = 114672)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Index Scan using wsc_c_spatial_ndx on&nbsp;<BR>
&gt;&gt; wsc_candidates w<BR>
&gt;&gt;&gt;&gt; (cost=0.00..8.27 rows=1 width=109) (actual time=0.022..25.991<BR>
&gt;&gt;&gt;&gt; rows=13168 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Index Cond: (w.geometry &amp;&amp; x.bbox)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filter: (w.geometry &amp;&amp; x.bbox)<BR>
&gt;&gt;&gt;&gt;&nbsp; Total runtime: 77232.901 ms<BR>
&gt;&gt;&gt;&gt; (9 rows)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 77233.773 ms<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; And for the real thing:<BR>
&gt;&gt;&gt;&gt; catest=# explain analyze select count(*) from wtm_sub_cell w,<BR>
&gt;&gt;&gt;&gt; order_line_item x WHERE w.geometry &amp;&amp; x.bbox AND<BR>
&gt;&gt;&gt;&gt; distance(w.geometry,x.geometry) = 0 AND x.id_as_int = 114672;<BR>
&gt;&gt;&gt;&nbsp;<BR>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;&gt; QUERY<BR>
&gt;&gt;&gt;&gt; PLAN<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&nbsp;<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt;&gt;&gt;&nbsp; Aggregate&nbsp; (cost=141.83..141.84 rows=1 width=0) (actual<BR>
&gt;&gt;&gt;&gt; time=77457.587..77457.588 rows=1 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Nested Loop&nbsp; (cost=5.99..141.83 rows=1 width=0) (actual<BR>
&gt;&gt;&gt;&gt; time=15.682..77456.541 rows=1112 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Join Filter: (distance(w.geometry, x.geometry) =&nbsp;<BR>
&gt;&gt; 0::double<BR>
&gt;&gt;&gt;&gt; precision)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Index Scan using oli_id_ndx on order_line_item x<BR>
&gt;&gt;&gt;&gt; (cost=0.00..8.30 rows=1 width=383) (actual time=0.012..0.018&nbsp;<BR>
&gt;&gt; rows=1<BR>
&gt;&gt;&gt;&gt; loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Index Cond: (id_as_int = 114672)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Bitmap Heap Scan on wtm_sub_cell w&nbsp;&nbsp;<BR>
&gt;&gt; (cost=5.99..132.97<BR>
&gt;&gt;&gt;&gt; rows=32 width=109) (actual time=2.988..21.796 rows=13168 loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filter: (w.geometry &amp;&amp; x.bbox)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp; Bitmap Index Scan on wsc_geom_idx1<BR>
&gt;&gt;&gt;&gt; (cost=0.00..5.98 rows=32 width=0) (actual time=2.828..2.828&nbsp;<BR>
&gt;&gt; rows=13168<BR>
&gt;&gt;&gt;&gt; loops=1)<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Index Cond: (w.geometry &amp;&amp; x.bbox)<BR>
&gt;&gt;&gt;&gt;&nbsp; Total runtime: 77457.633 ms<BR>
&gt;&gt;&gt;&gt; (10 rows)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 77458.458 ms<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; The tables involved by size:<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wsc_candidates;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp; 13168<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 2.586 ms<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from oli_req;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; -------<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 0.193 ms<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from wtm_sub_cell;<BR>
&gt;&gt;&gt;&gt;&nbsp;&nbsp; count<BR>
&gt;&gt;&gt;&gt; ---------<BR>
&gt;&gt;&gt;&gt;&nbsp; 6399928<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 1776.508 ms<BR>
&gt;&gt;&gt;&gt; catest=# select count(*) from order_line_item;<BR>
&gt;&gt;&gt;&gt;&nbsp; count<BR>
&gt;&gt;&gt;&gt; --------<BR>
&gt;&gt;&gt;&gt;&nbsp; 395921<BR>
&gt;&gt;&gt;&gt; (1 row)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Time: 176.083 ms<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Many thanks for your time and bandwidth!<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Greg Williamson<BR>
&gt;&gt;&gt;&gt; Senior DBA<BR>
&gt;&gt;&gt;&gt; GlobeXplorer LLC, a DigitalGlobe company<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Confidentiality Notice: This e-mail message, including any<BR>
&gt;&gt;&gt;&gt; attachments, is for the sole use of the intended recipient(s)&nbsp;<BR>
&gt;&gt; and may<BR>
&gt;&gt;&gt;&gt; contain confidential and privileged information and must be&nbsp;<BR>
&gt;&gt; protected<BR>
&gt;&gt;&gt;&gt; in accordance with those provisions. Any unauthorized review, use,<BR>
&gt;&gt;&gt;&gt; disclosure or distribution is prohibited. If you are not the&nbsp;<BR>
&gt;&gt; intended<BR>
&gt;&gt;&gt;&gt; recipient, please contact the sender by reply e-mail and&nbsp;<BR>
&gt;&gt; destroy all<BR>
&gt;&gt;&gt;&gt; copies of the original message.<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; (My corporate masters made me say this.)<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&nbsp;<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt; --<BR>
&gt;&gt;&gt;&gt; _______________________________________________<BR>
&gt;&gt;&gt;&gt; postgis-users mailing list<BR>
&gt;&gt;&gt;&gt; postgis-users@postgis.refractions.net<BR>
&gt;&gt;&gt;&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt; --<BR>
&gt;&gt;&gt; Martin Davis<BR>
&gt;&gt;&gt; Senior Technical Architect<BR>
&gt;&gt;&gt; Refractions Research, Inc.<BR>
&gt;&gt;&gt; (250) 383-3022<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; _______________________________________________<BR>
&gt;&gt;&gt; postgis-users mailing list<BR>
&gt;&gt;&gt; postgis-users@postgis.refractions.net<BR>
&gt;&gt;&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&nbsp;<BR>
&gt;&gt; ----------------------------------------------------------------------<BR>
&gt;&gt; --<BR>
&gt;&gt;&gt; _______________________________________________<BR>
&gt;&gt;&gt; postgis-users mailing list<BR>
&gt;&gt;&gt; postgis-users@postgis.refractions.net<BR>
&gt;&gt;&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;&gt;&gt;<BR>
&gt;&gt; --<BR>
&gt;&gt; Martin Davis<BR>
&gt;&gt; Senior Technical Architect<BR>
&gt;&gt; Refractions Research, Inc.<BR>
&gt;&gt; (250) 383-3022<BR>
&gt;&gt;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; postgis-users mailing list<BR>
&gt;&gt; postgis-users@postgis.refractions.net<BR>
&gt;&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; postgis-users mailing list<BR>
&gt;&gt; postgis-users@postgis.refractions.net<BR>
&gt;&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; postgis-users mailing list<BR>
&gt; postgis-users@postgis.refractions.net<BR>
&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; postgis-users mailing list<BR>
&gt; postgis-users@postgis.refractions.net<BR>
&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
<BR>
_______________________________________________<BR>
postgis-users mailing list<BR>
postgis-users@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>