On Oct 27, 2011, at 10:40 AM, Torsten Mohr wrote: > Hello, > >> Mapnik's postgis plugin has an option called 'cursor_size'. >> It is default set to 0 which mean no cursors are used, >> but it you set it to some value over 0 then results will be fetched in >> chunks. >> >> Try that and let us know how it works for you. > > thanks for that hint. In the XML files i have added: > > <Parameter name="cursor_size">100</Parameter> > > It seems that that query now takes forever. Maybe 100 is not the best choice?
Taking forever is a good sign that parameter is working, and fetching chunks of 100 rows at a time. Why don't you calculate the number of rows of your data and try fetching 1/3 at a time? Also, cursor_size is simply a postgres feature and not a mapnik one, but our implementation may not be optimal. See http://www.postgresql.org/docs/9.0/static/plpgsql-cursors.html for more info. > > Does anybody have a hint on what would be a reasonable value for cursor_size? > > On the other hand, what amount of RAM would help in not needing to set > cursor_size? I have 8 Gb RAM at the moment, would an update to 16 Gb help? Just a guess, but I bet that postgres configuration settings are the first limit here not (just) your system resources - so look into editing your postgres settings to see if you can allow more memory usage per query. > > > Best regards, > Torsten. > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

