Hi,

I just started investigating the usage of MonetDB with our relatively large XML document(s). It can go up to 1 million nodes in a tree type structure, like (simplified example)

<item id="1" key="32">
    <item id="2" key="34"/>
    <item id="3" key="32">
      <item id="4" key="32"/>
      <item id="5" key="342">
       <item id="6" key="32212" />
      </item>
    </item>
    </item>
    <item id="7" key="2">
      <item id="8" key="654"/>
    </item>
</item>
<item>
......
</item>
.....

The key refers to a another document that contains the actual data (if all the items in the tree are unique it contains the same amount of nodes as the tree, but may be a lot less) , basically a flat list of the item data (name etc..).
<data key="32">
   <name>hello</name>
   <description>this is a test item</description>
</data>
<data key="342">
....
</data>


The general issue is to get the tree location and key value from the tree.
With a basic query like "//item[@id='33']" it takes about 3.5 seconds to get the item, and about as long to get the metadata from the other document. Using prepared queries had no effect (at least any improvement). The machine is a Intel(R) Xeon(TM) CPU 2.80GHz on Linux with 3Gb of memory. Is this level of performance expected or am I missing something essential?





Another issue was when I tried to run a query through the JDBC driver. It dies with an exception (does it time out?):

Exception in thread "main" java.lang.AssertionError: block 0 should have been fetched by now :(
        at nl.cwi.monetdb.jdbc.MonetConnection$ResultSetResponse.getLine(MonetConnection.java:1730)
        at nl.cwi.monetdb.jdbc.MonetResultSet.absolute(MonetResultSet.java:188)
        at nl.cwi.monetdb.jdbc.MonetResultSet.relative(MonetResultSet.java:2132)
        at nl.cwi.monetdb.jdbc.MonetResultSet.next(MonetResultSet.java :2099)
        at TestCache.monetDBTest(TestCache.java:99)
        at TestCache.main(TestCache.java:180)

I tried to find an item with its description like "//data/description[contains(.,"test")]" The query runs around 5 seconds with the MapiClient.



The MonetDB was downloaded and compiled yesterday (Monet Database Server V4.16.2). My XPath skills are less then admirable so all suggestions are appreciated.


Cheers,
--
Tatu Lahtela < lahtela@gmail.com>