Hi,
We have a collection with 9200 very small and simple documents (data volume in total ~1MB ) like:
+3456-789
Hans Muster
Retrieving all documents with the query “input()/person” via Java-Api takes about 6 seconds (only the query time, without reading the result in java) This is too long, when comparing with e.g. SQL Server, storing the data in a relational table, takes only a few milliseconds. We expect much higher data volume.
We guess this is not normal and we missed something, e.g. some parameter settings or inappropriate query??
Any kind of tuning suggestion is welcome.
In Java, we use TDOMObjectModel and TXQuery objects to perform the query.
We use Tamino 4.1.4.1 (from XML Starter Kit) on Windows XP Professional. The Computer is a Pentium 2,8 Ghz, 2GB RAM
Oh, I forgot to say that in Interactive Interface you should specify
Position in result set = 1
Result size = 1
Also, you should try X-Query (/document), as opposed to XQuery, to compare performance.
My guess is that querying all the documents does locking, or something similar, that takes time proportional to the number of documents… Querying with a condition (input/document[@id=123]) is fast, right?
Great, thanks for that hint, that helped a lot
Like you said, it is fast, when querying with result size = 1. Do you know how to specify this parameters via Java-API?