no improvement with dbxml-indexes? - 06-21-2004 , 04:03 AM
I am experimenting with dbxml-indexes. And there is no improvement at all.
So I guess I did something wrong.
My query looks like this:
xPath = "/pdbdXML/pLKat/pKat/pLGr/pGr[@I='tlg.STLB-Bau.1']";
The attribute "I" is the key of a XML-Doc in the container. So I created the
"/pdbdXML/pLKat/pKat/pLGr/pGr/@I" with "edge-attribute-equality-string"
To find a document in a container with about 4000 docs takes up to one
minute. I tried to search with the help of meta-data
("/*[@dbxml:name='tlg.STLB-Bau.1']"). Also one minute. An index on
"dbxml:name" with "node-attribute-equality-string" also did nothing.
Is there a fast (<10Sec) way to find one document in a container with many
Re: no improvement with dbxml-indexes? - 06-21-2004 , 06:05 AM
"Susanne Klemm" wrote
Index on "I" with "node-attribute-equality-string"
Now it takes only 0,05% of the previous time without index 30ms instead
In the documentation I read that the engine prefers "edge"-indexes. So still
my question: Why didn't the first version work?
Re: no improvement with dbxml-indexes? - 06-21-2004 , 12:16 PM
The BDB XML mailing list is a better place for these questions.
You can subscribe by emailing to xml-subscribe (AT) sleepycat (DOT) com.
Indexes can certainly make your queries run much faster than you
The problem with your first index is that the call to add indexes
only takes a single node node (element or attribute), so you
should be using "I", "edge-attribute-equality-string"
The name issue is likley namespace-related. You cannot
add an index for "dbxml:name." It must be added for
"name" using the dbxml uri, "http://www.sleepycat.com/2002/dbxml"
The latter is available (in C++) as the global,
It's not necessary to bind this namespace in an XmlQueryContext. If
you query for /*[@dbxml:name], the binding between the "dbxml" prefix
and the correct URI will be found, implicitly.