[GRASS-dev] postgresql speed
Moritz Lennert
mlennert at club.worldonline.be
Wed Mar 4 08:32:18 EST 2009
On 03/03/09 22:17, Wouter Boasson wrote:
> In reply to Vincent's remarks on database interfaces:
> I don't know how the db.* modules are implemented, but I can't imagine that
> they process the data themselves.
No, they use the underlying engine of the backend. But connection is
costly. This is why scripts which had a loop calling [v.]db.* statements
in each run of the loop should be rewritten to collect SQL statements in
a temp file and then call db.execute once at the end. See [1] for the
example of v.rast.stats.
See also some comments of Radim in [2] under "Attributes".
Moritz
[1]http://trac.osgeo.org/grass/changeset/20358
[2]http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD&content-type=text/vnd.viewcvs-markup
More information about the grass-dev
mailing list