[postgis-users] Tuning

dblasby at openplans.org dblasby at openplans.org
Wed Mar 16 10:21:38 PST 2005


Guillaume SUEUR (Géosignal) wrote:

>For most of the types it's ok, but when I try to display the heaviest
one >(street, 1400000 rows), the map generation is very long (about 40
>seconds), even using a close scale (10000, less than 20 streets are
then >displayed.

This usually happens when you didnt 'analyse' the table.  Analyse does
some simple statistics that the SQL statement optimizer needs to know
in order to make an efficient query plan.

# analyse <table name>;  --- does one table
# analyse;  -- does entire database  (I think - check the documentation)

Wen you find a query that's really slow, you should ask postgresql what
query plan it's using:

# EXPLAIN ANAYSE <your query>;

It will execute the query, and compare its estimates vs what actually
happened.

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/



More information about the postgis-users mailing list