<HTML><FONT FACE=arial,helvetica><HTML><FONT SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="2">Hi.<BR>
<BR>
Some time ago, I complained about the speed of the postGIS-Inteface.<BR>
I also suggested to keep the data persistent for a session - this suggestion was postpone to a later date.<BR>
<BR>
Unsatisfied with that, I thougth about a possibility to, at least, increase the speed of querying spatial data. I found thuban was using the 'astext()'-function of postGIS to read the shapes.<BR>
Next, I compared this possibility with reading the shapes with binary cursor from the database. (This was in Java and JDBC, because I'm much more familiar with it) It happend to be more than 30 times faster.<BR>
<BR>
So I decided to rewrite the postgisdb.py and wellknowntext.py files using a binary cursor. Unfortunately, it seems to me as if psycopg is unable to read 'normal data' (integer, double, text...) as a binary cursor. Trying that, always killed the python-interpreter. So there are now two queries for one old query. One for the shapeid-data like 'gid' and stuff, and one for the shapes.<BR>
I have to confess, it did only increase speed by the factor three to four. Thuban needed 226 secs for 91.000 shapes with the old version and 69 secs with my versions. (Yes, I always cleared the query-buffer of postgreSQL)<BR>
<BR>
Though this still isn't fast enough for my purpose, I thought perhaps you would like to see it.<BR>
<BR>
Happy May Day! (Klingt das nicht komisch?)<BR>
<BR>
Jens</FONT></HTML>