dbTalk Databases Forums  

no improvement with dbxml-indexes?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss no improvement with dbxml-indexes? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Susanne Klemm
 
Posts: n/a

Default no improvement with dbxml-indexes? - 06-21-2004 , 04:03 AM






Hello!

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
following index:
"/pdbdXML/pLKat/pKat/pLGr/pGr/@I" with "edge-attribute-equality-string"

No affects!

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
(~4000) docs?

thank you!

Susanne Klemm


Reply With Quote
  #2  
Old   
Susanne Klemm
 
Posts: n/a

Default Re: no improvement with dbxml-indexes? - 06-21-2004 , 06:05 AM






"Susanne Klemm" wrote

Quote:
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
following index:
"/pdbdXML/pLKat/pKat/pLGr/pGr/@I" with "edge-attribute-equality-string"
I tried something else:
Index on "I" with "node-attribute-equality-string"
Now it takes only 0,05% of the previous time without index 30ms instead
of 60000ms

In the documentation I read that the engine prefers "edge"-indexes. So still
my question: Why didn't the first version work?



Reply With Quote
  #3  
Old   
George Feinberg
 
Posts: n/a

Default Re: no improvement with dbxml-indexes? - 06-21-2004 , 12:16 PM



Susanne,

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
are seeing.

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,
DbXml::metaDataNamespace_uri.
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.

Regards,

George

Quote:
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
following index:
"/pdbdXML/pLKat/pKat/pLGr/pGr/@I" with "edge-attribute-equality-string"

No affects!

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
(~4000) docs?

thank you!

Susanne Klemm

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.