XmlContainerConfig::setSequenceIncrement API Ref

#include <DbXml.hpp>

void XmlContainerConfig::setSequenceIncrement(u_int32_t incr)

u_int32_t XmlContainerConfig::getSequenceIncrement()


Description: XmlContainerConfig::setSequenceIncrement

Sets the integer increment to be used when pre-allocating document ids for new documents created by XmlContainer::putDocument.

Every document added to an XmlContainer is assigned an internal unique ID, and BDB XML performs an internal database operation to obtain these IDs. In order to increase database concurrency and improve performance of ID allocation, BDB XML pre-allocates a sequence of these numbers. The size of this sequence is determined by the value specified here. The default ID sequence size is 5.

Be aware that when a container is closed, any unused IDs in the current sequence are lost. Under some extreme cases, this can result in a container to which documents can no longer be added. For example, setting this value to a very large number (such as, say, 1 million) and then repeatedly opening and closing the container while adding a few documents may eventually cause the container to run out of IDs. Once out of IDs, the container will never again be able to accept new documents. However, document IDs are 64-bit quantities so this is extremely unlikely.

You should almost always leave this value alone. However, if you are loading a large number of documents to a container all at once, you may find a small performance benefit to setting the sequence number to a larger value. If you do this, be aware that this value is persistent across container opens, so you should take care to reset the value to its default once you are done loading the documents.

Parameters
incr

APIRef

Copyright (c) 1996-2009 Oracle. All rights reserved.