[postgis-devel] Re: geometry stats

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Fri Mar 5 02:21:47 PST 2004


Hi strk,

> -----Original Message-----
> From: strk [mailto:strk at keybit.net] 
> Sent: 04 March 2004 19:22
> To: Mark Cave-Ayland; 'David Blasby'; 
> postgis-devel at postgis.refractions.net; 'Paul Ramsey'
> Subject: Re: [postgis-devel] Re: geometry stats
> 
> 
> I wrote a test script for the estimation routine.
> 
> It divides the whole table extent into query cells
> and queries the db. This is done with boxesPerSide
> going from 1 to 40.
> 
> So the first level will make a single query,
> the second level will make 4 queries, then 16 ... up to 40*40.
> 
> I send it as an attachment here, so I hope we can have a 
> better look at what it's going on.
> 
> --strk;


Thanks for this - sorry if the dataset was too large for you to download
:(. I've run your script and attached the output to this email. The
estimates in the output from your script look really good, however the
results are still the same as they were before, e.g.


pgtest=# explain analyze select * from wgs84_polygon where geom &&
setSRID('BOX3D(-179.0 -90.0, 179.0 90.0)'::box3d, 4318);
                                                                  QUERY
PLAN                                                  
------------------------------------------------------------------------
-----------------------------------------------------------------------
 Index Scan using wgs84_polygon_idx on wgs84_polygon
(cost=0.00..3636.29 rows=976 width=2743) (actual time=0.042..622.979
rows=52464 loops=1)
   Index Cond: (geom && 'SRID=4318;BOX3D(-179 -90 0,179 90
0)'::geometry)
 Total runtime: 662.376 ms
(3 rows)



Once again, please let me know if there is anything else you need to
help you debug this.


Cheers,

Mark.

---

Mark Cave-Ayland
Webbased Ltd.
Tamar Science Park
Derriford
Plymouth
PL6 8BX
England

Tel: +44 (0)1752 764445
Fax: +44 (0)1752 764446


This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender. You
should not copy it or use it for any purpose nor disclose or distribute
its contents to any other person.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_estimation.txt
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20040305/d759b1f4/attachment.txt>


More information about the postgis-devel mailing list