[postgis-users] Queries are a little slower on my dev db than my prod db

David Blasby dblasby at refractions.net
Wed May 5 09:29:17 PDT 2004


Zamil Murji wrote:
> Hello list,
> 
> I just build a dev database on the same box that runs my prod database. Queries on my prod database using mapserver are incredibly fast (< 0.5 seconds), however, queries on my dev database using mapserver are slow (> 3 seconds). 
> 
> 2 questions:
> 1) How can I get the exact query that mapserver is using against my data?
> 2) I seen some talk about a query analyze function in postgres, how do I use it once I have the query from both the prod and dev data?


In your layer definition in mapserver, you can set
	DEBUG   TRUE (or 1)

Alternatively, you can set the logging flag in you postgresql .conf 
file.  There's documenation in the .conf file for this.

Make sure you've created all your indexes and vacuum analysed the database.

dave



More information about the postgis-users mailing list