[Monetdb-developers] Geom and its examples.

Stefan de Konink skinkie at xs4all.nl
Fri Jan 4 04:20:53 CET 2008


So I decided to try out Geom, and after copying in a small set of data. 
I decided to test if it was any faster than my own made up SQL fantasy, 
which greatly seems to depend on the state MonetDB is in, I had some 
nice results before my Geom test, but I guess I just have overloaded the 
database again.

select * from nodes, node_tags where latitude >= 52.375 AND latitude <= 
52.379 AND longitude >= 4.89 AND longitude <= 4.90 AND nodes.id = 
node_tags.node AND name='amenity' and value='atm';

Took before 8 seconds... now it is ending nowhere. (In the over 10 
minutes range.) Next to this now is 27.8GB in virtual memory (my entire 
dbfarm directory, while the data that is required for this query BY FAR 
not that amount of data.) So I suspect a problem in the Geom code :) 
read on :)

I'm using the very latest CVS HEAD.

sql>SELECT id, geometry FROM nodes_geom LIMIT 1;
| id |geometry                                                             |
|  2 |POINT (50.1360073999999969 8.3023717000000001)                       |

Looks shining.

Lets do a basic operation:

sql>SELECT id, X(geometry) FROM nodes_geom LIMIT 1;
!types point(0,0) (wkb) and geometry(0,0) (wkb) are not equal

Hum. Was it my poor choose of column name?

So I decided to try out the example:


sql>SELECT forests.name,buildings.name
more>FROM forests,buildings
more>WHERE forests.name = 'Green Forest' and
more>    Overlaps(forests.shape, buildings.outline) = true;
!types multipolygon(0,0) (wkb) and geometry(0,0) (wkb) are not equal

So what went so terribly wrong? Or better: what can be done to fix it.

Yours Sincerely,

Stefan de Konink

More information about the developers-list mailing list