[GRASS5] Feature-Request: Prompt for PostGIS-connection
sholl at gmx.net
Fri Oct 3 05:10:53 EDT 2003
At Fri, 3 Oct 2003 10:36:57 +0200 Radim Blazek wrote:
> > was really slow, but....
> > * PostGIS-Server is not on the same maschine G57 is running, but
> > inside a 10Mbit-LAN
> > * PostGIS-Server is 500Mhz-server
> > Maybe this is a bottleneck?
> No the problem is in GRASS,
> 1) GRASS uses random access (read line by line number), this is
> fast for native format but cannot be for RDBMS, as it must send query
> for each line and that is slow especially over network (send query and
> wait for respons for every line). I don't know how to solve this.
> 2) Currently, to read one line, GRASS performs more queries:
> - select type, NumPoints(), Dimension()
> - BEGIN (because binary cursors must be in transaction, IIRC)
> - DECLARE gcursor BINARY CURSOR FOR SELECT ASBINARY( "geom FROM table
> WHERE id = ...")- FETCH ALL in gcursor
> - CLOSE gcursor
> - COMMIT
> - SELECT field, cat FROM table WHERE id = ...
> this could be reduced, probably return to WKT and parse results in
> GRASS, so from 7 queries to 2, and PostGIS in GRASS will be faster in
> this ratio(7/2) (?). It was my stupid idea that binary cursor is be
> faster ;)
OK, thanks for clarification.
> I am considering to either remove PostGIS support at all or do not
> officially support in 5.8 (or how they call it).
So there are no plans to reduce queries mentioned above and parse the
results in GRASS?! I would like to see this feature here to speed up
More information about the grass-dev