PostGIS vs. Shapefile

Bart van den Eijnden bartvde at XS4ALL.NL
Thu Feb 10 05:12:54 EST 2005


Hi Daniele,

No that's not normal.

Do you have a spatial index on your table in PostGIS? Do you have an index
on the primary key of your table?

Best regards,
Bart

> Hi all,
> I have made some spatial queries (with cgi-bin Mapserver 4.2.3)
> alternately with data stored in shapefiles and PostGIS (imported from
> these shapefiles).
>
> My query (304 elements on 5 layers) takes 5 seconds (elaboration, and
> then output on browser) if data are read from shapefiles, and about 50
> seconds if data are read from PostGIS.
>
> The query is the same: I simply press "reload" on my browser (after
> manually changed .map file and query template files) to be sure of it...
>
> Is it normal?
>
>     Daniele
>
>
> P.S.:
> My system is a Linux Red Hat 9.
>
> My mapserver is:
> $ ./mapserv -v
> MapServer version 4.2.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=POSTGIS
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> Postgresql and PostGIS are installed from RPMs (the version is:
> postgresql-postgis-7.3.4-3.rri1.i386.rpm).
>
>
>



More information about the mapserver-users mailing list