[postgis-users] Trying to figure out how statistics for the plannerwork

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Fri Mar 10 05:27:30 PST 2006


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Steve Wormley
> Sent: 10 March 2006 06:49
> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Subject: [postgis-users] Trying to figure out how statistics for the
> plannerwork
> 
> I'm having an interesting issue with a table on my system. It has about
> 1.6
> million rows with a geometry field of lat and lon points spread over most
> of
> the northern hemisphere.
> 
> I have one query where the Postgres planner is coming up with a totally
> wrong estimate(which causes some other problems)
> 
> explain  analyze select * from  meta_data meta where
> SetSRID(MakeBox2D(MakePoint(-91.560758196875,-
> 91.560758196875),MakePoint(1.5
> 6075819687499,1.56075819687501)),4326) && meta.wkb_geometry;


Hi Steve,

I'm guessing that you don't see any NOTICE messages emitted to the console
and/or the logfile? First thing would be to confirm the versions of both
PostGIS/PostgreSQL you are using with SELECT version() and SELECT
postgis_full_version(), and send along the schema of the tables you are
using (include the output of \d in psql).

Looking at your query, I am also a little confused by the syntax in your
SQL: "select * from meta_data meta".  Is meta supposed to be an alias for
another table or schema, or is it some form of join? It could be that the
current code doesn't work for SQL aliases but only on the actual table names
themselves.


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT

T: +44 (0)1752 797131
F: +44 (0)1752 791023

http://www.webbased.co.uk   
http://www.infomapper.com
http://www.swtc.co.uk  

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.





More information about the postgis-users mailing list