Forum Stats

  • 3,781,257 Users
  • 2,254,496 Discussions


dbxml index creation problem

652142 Member Posts: 37
edited Oct 12, 2009 3:28PM in Berkeley DB XML
I've got a database container sporting DBXML_INDEX_NODES. It has about 70K documents, average
document size is 8K. To load the database I really have to create the indices and then load,
otherwise sometimes I get a out of memory error when creating them after the load of the 70K documents.
Sometimes I get another prompt and it appears to have worked, I describe below:

Anyway, I fired up dbxml and created another index, I have 7, adding:

addi "" edge-element-equality-string country

My machine pegs one of the cpus for about a minute, then the dbxml
prompt comes back. I do a 'listi' and I don't see the index in the list.
However, if I erase the database, then create it from scratch, I can create the index
and see it with listi just fine.

Obviously I am hitting some sort of limit. What can I bump? My linux box
has 4 cores, 8BG mem, all the disk space one could want. I fire up dbxml with -z 2048,
is there something I can do to increase the bdb env stuff to distance myself from these
issues? Is there a log file I can look at to see what is blowing up?




  • It is recommended that indexes be added before data, since indexing an already filled container is very expensive. Although the shell failing without explanation is a bug.

    Increasing the cache size more might help, but it is possible that you are just hitting a known bug where indexing an extremely large amount of data at once can cause an out of memory error. Adding the index an an application instead of the shell may reveal if that is the case. This bug is fixed in the soon to be release 2.5.

    Lauren Foutz
  • Gmfeinberg-Oracle
    Gmfeinberg-Oracle Posts: 1,328 Employee

    addi "" edge-element-equality-string country

    Is not the correct syntax for the dbxml shell
    dbxml> help addi
    addIndex -- Add an index to the default container
    Usage: addIndex [<nodeNamespaceUri> <nodeName>] <indexDescription>

    If you have not just had a cut/paste error in your post that'd be the problem here.
  • 652142
    652142 Member Posts: 37
    In the example I'm trying to add an index with no namespace declaration.
    That is, my document data will look like:


    country has no declared namespace.
    since I must provide the namespace before providing the node name, I attempt
    to use a 0 length string. What would be the correct way to declare the index described?

  • 637288
    637288 Member Posts: 488
    Yes, it's the correct way. But you don't forget to put the index specification on the third place, and the node name on the second place.
This discussion has been closed.