You need to be a bit more specific about what you mean by "slow". What
operations precisely are slow?
Having said that, in general any columns - spatial or otherwise - to
which you refer in WHERE clauses in your SELECT statements should be
considered for indexing, especially if you use them in join conditions.
If you have a specific SELECT statement that gives you problems, you
might try using an EXPLAIN or ANALYZE together with the statement as for
example in
http://www.postgresql.org/docs/8.1/static/sql-explain.html
2700 tables - that is a lot of tables. I have no idea if such a large
number of tables will slow down query execution, but it seems possible.
Do you really need that many tables? For example, if you have all the
IGM shape files by map sheet for loading, you don't need to create a
table for each shape file. Rather you might put all the different
"caminos" shape files into one table, and the "comunas" into another,
and so on. Sorry I'm just guessing at what you might be doing here, if
I'm wrong please ignore!
La documentación de PostgreSQL es disponible en castellano, por ejemplo
en el sitio
http://palomo.usach.cl/docshtml/node4.html
> ______________________________________________________________________
> Windows Live: Make it easier for your friends to see what you’re up to
> on Facebook.
> _______________________________________________
> postgis-users mailing list
> postgi...@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
--
Regards,
Chris Hermansen · mailto:chris.h...@timberline.ca
tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.840.4625
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Dear Cesar,
using GIST index in geographic database is nearly a must, but still
You can't compare to Google maps, which is using different technology.
p.mapper is fetching data from database and rendering a new map every
time You move in the map. Google maps is using pre-cached map tiles,
which are rendered once and than served from cache as static images
with very good performance. I recommend You to move to OpenLayers and
Tilecache.
Ivan
Ok so I think part of your problem is that you have the data for each
comuna in a separate table.
Really, there should only be 11 tables in your database, one for each
layer.
Your speed problem comes from opening all the tables to do the queries.
This will be S L O W.
What you need to do is create a database with a table for eg "caminos".
Then you must convert each IGM caminos shape file to a postgis load file
and load each one of those converted shape files INTO THE SAME TABLE.
If you are using ogr2ogr there is an option to append data to an
existing table. Therefore, for the first comuna, create the table; for
the subsequent 269, append the data to the same table you created.
Do you follow me?
Once you have all the data loaded, then you should create GIST indexes
on your 11 tables' geometry columns.
Si quieres discutirlo en castellano por favor enviame un email privado.
> ______________________________________________________________________
Hola, primero que bueno encontrar personas de chile aquí. Me parece extraño el tema de la velocidad sobre todo si dices que tienes 4 o 5 usuarios conectados, hay varios pasos a seguir para saber si esta bien el seteo de software como de hardware, en términos generales veo que es un buen hardware sobre todo por el tema de 64bit, que es donde corre mucho mejor el postgres, casi tres a cuatros veces que una maquina de 32, pero medio corto en términos de RAM, pero depende de su tunning, como por ejemplo el share_buffer sus check_point, etc, lo otro son los índices de tus tablas, como regla genero 3 a 4 indices, ya que son por los cuales la mayoría de las veces se generan las búsquedas espaciales, los primeros indices obviamente deben ser por el campo the_geom y por el gid, que deben ser GiST y btree, después en el caso que se hagan búsqueda por algún campo propio de tu geo tabla, como por ejemplo búsqueda por ingeniería social, llamece por ROL o un RUT, a esos también debieces generarles índices,
Volviendo al tema postgres el ideal es que sea sobre la versión 8.3 en adelante, la versión del postgis 1.4, si no no tiene mucho sentido, y obviamente si tu maquina es de 64bit, debes haberle instalado el SO de 64bit y la compilación del postgres o su instalación RPM deben ser de 64 bit ojo con eso por q muxas veces tu instalas un postgres en una maquina 64 y queda la instalación de 32, de andar anda, pero es como si le pusiera ruedas de triciclo a un auto (guardando las proporciones). Ojala te sirva la ayuda y si necesitas mas pistas o tips no hay problema en seguir apoyando, también puedes revisar algunos de los sistemas que desarrollamos con open free gis, en www.idatum.cl , claro que no ocupamos framework viewer, si no que los desarrollamos nosotros mismos, también tenemos sistemas de gestión, control y seguimiento gis, todo esto en Chile lo puedes ver en chaiten.bienes.cl sim2.origenes.cl mtv.mideplan.cl esiir.cnr.cl www.geonodo.cl saludos.
Patricio Cifuentes Ithal
Ingeniero en Informática - Ingeniería y Desarrollo de Proyectos
+56(2) 344 06 80 | www.siigsa.cl
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
www.siigsa.cl
Patricio, thanks for your info, first of all. But, could you please
use english language in this list? I'm spanish, but not all people
understand it. Anyway, many thanks again.
Best regards,
Jorge