We are migrating from IPedo to Berkeley DB.
IPedo did not support multiple indices in their Xqueries, so we had to
concatenate some fields in to one field and index that field, the
Xqueries were really fast.
Unfortunately the same XQuery does not perform well in BerkeleyDB.
This is how we create the index for this filed (ContentKey) in
BerkeleyDB
addIndex '' 'ContentKey' edge-element-equality-string
and this is how I query using Java API.
queryContext.setEvaluationType(XmlQueryContext.Eager);
queryContext.setVariableValue("ContentKey", new XmlValue(
"a0a0188000001115348efcc00000003XXXXXXXXXXXXXYYYYYYYYYYYYYY"));
// Declare the query string
String myQuery = "collection('db/title')/Record[ContentKey=
$ContentKey]";
// Prepare (compile) the query
XmlQueryExpression xmlQueryExpression =
dbManager.prepare(myQuery,queryContext);
1. What is wrong with the index or the way I am using the Java API ?
Changing the evaluation type to Lazy did not help at all.
2. The Query performs OK in dbxml.
3. Are there any other commercial/open source tools to evaluate the
performance of a Xquery in BerkeleyDB? Stylus Studio does not support
BDB - 2.3.10 yet.
Any help would be appreciated.
Thanks,
Suresh