<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Also,<br><br>In Postgis you can use the ST_Simplfy() function in mapserver zoom (scale dependent) layers. So you have one dataset, and as you zoom out you display features represented by progressively fewer vertices. You don't need every headland of a global coastline dataset plotted until you  until you zoom in. This can give vastly better performance than a shapefile when zoomed out.<br><br>You can use pre-prepared geometries, so each record has more than one geometry column, or you can do the point reduction on the fly (in the SQL command in the mapfile DATA statement), whichever meets your needs.<br><br>The default Postgres configuration is for pretty basic hardware. You might find & run pgtune, or look at the postgres admin docs to configure it to more effectively use the available memory, and see how to use tablespaces to manage data &
 indexes across filesystems to increase overall disk throughput. <br><br>So it takes some work, but overall, Postgis provides spatial data management tools with substantial performance optimisation capabilities. But you need to use them.<br><br>For plotting an entire unsimplified dataset, the overhead of a database will always be somewhat slower than a file streaming from disk. Note that on good hardware with an well optimised database even this difference can be minimised.<br><br>Cheers,<br><br>   Brent Wood<br><br>--- On <b>Wed, 2/15/12, Stephen Woodbridge <i><woodbri@swoodbridge.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Stephen Woodbridge <woodbri@swoodbridge.com><br>Subject: Re: [postgis-users] advice for quicker display?<br>To: postgis-users@postgis.refractions.net<br>Date: Wednesday, February 15, 2012, 8:14 AM<br><br><div
 class="plainMail">On 2/14/2012 1:57 PM, Bistrais, Bob wrote:<br>> As some of you already know, I’m a newbie to PostGIS and have just<br>> barely got a test PostGIS database up and running. So, my latest<br>> question is in regards to draw times. I created a statewide parcel layer<br>> from a shapefile. At statewide scale, when the application loads, the<br>> parcel data draws far slower than the original shapefile did. How can I<br>> tune this so that draw times are better?<br><br>If you are drawing all the data, it will always be slower than shapefiles. The trick is to not draw more than is reasonable at a given scale. So the answer is don't try to draw all the parcels for the whole state. As you zoom in and need to only draw a subset of the parcels, you will start to get speed advantages by using the spatial (GIST) indexes in postgis.<br><br>create index mytable_the_geom_gidx on mytable using gist (the_geom);<br><br>-Steve
 W<br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>