Slow postGIS data query (was RE: [postgis-users] mapserverdbconnection)

Frances Collier fcollier at preparedresponse.com
Wed Oct 26 09:16:39 PDT 2005


Mark,

The query I tested was "Select the_geom from europecountries". There are
only 50 rows in the table, however they are large width-wise. For the entire
table to be retrieved (an area of 33857499) it took 13 seconds versus 3
seconds for the shape file. These times decreased to my last run (an area of
15159) which took 2 seconds for the database but 0 seconds for the shape
file. Now, these are rough figures, but I thought good enough to enhance our
understanding of how Mapserver dealt with the two different ways of
obtaining data.

Thank you,

Frances

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mark
Cave-Ayland
Sent: Wednesday, October 26, 2005 2:17 AM
To: 'PostGIS Users Discussion'
Subject: RE: Slow postGIS data query (was RE: [postgis-users]
mapserverdbconnection)


> -----Original Message-----
> From:	postgis-users-bounces at postgis.refractions.net on behalf 
> of Frances
> Collier
> Sent:	Mon 10/24/2005 1:29 PM
> To:	postgis-users at postgis.refractions.net
> Cc:	
> Subject:	[postgis-users] mapserver db connection
> Hello,
> 
>  
> 
> I've been trying to find out what exactly Mapserver gets back 
> from Postgis when querying the tables. I haven't found this 
> to be documented anywhere. Does Postgis return a shape file, 
> layer, or simply data rows? The reason I'm asking is that I 
> noticed a huge time difference between connecting to Postgis 
> and simply calling the shape files - with the Postgis being 
> significantly slower. I know Postgis offers a lot more 
> functionality, but for simple comparisons I do not have any 
> type of filter applied.
> 
>  
> 
> I'd appreciate any knowledge, advice, and/or direction.
> 
>  
> 
> Thank you,
> 
> Frances Collier


Hi Frances,

What do you mean by significantly slower? Can you quantify this in seconds,
for example a shapefile query is instant whereas a PostGIS query takes 5s?


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.


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list