Hi thanks for all your answers. Concerning the problem of the same "running time" I'm really surprised but I can confirm that the EXPLAIN ANALIZE time is different from the query execution time. probably it happen something like this: http://bytes.com/topic/postgresql/answers/422841-explain-analyze-total-runtime-walltime But we have tried to remove the fk constraints without any improvement Concerning the client problem, e have tried to execute the query directly on the server using psql. The difference is still in the order of seconds: around 10 ms VS 5000 ms many thanks... other suggestions? ivan and mauro -- Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt. Preferisco formati liberi. Please try to avoid to send me .dwg, .doc, .xls, .ppt files. I prefer free formats. http://it.wikipedia.org/wiki/Formato_aperto http://en.wikipedia.org/wiki/Open_format Ivan Marchesini Perugia (Italy) Socio fondatore GFOSS "Geospatial Free and Open Source Software" http://www.gfoss.it e-mail: ivan.marchesini@xxxxxxxxxxx ivan.marchesini@xxxxxxxxx fax (mailfax): +39 1782092534 jabber: geoivan73@xxxxxxxxxx skype: geoivan73
Attachment:
signature.asc
Description: This is a digitally signed message part