==Index Construction==
If main memory runs out while creating a value index, the currently generated index structures will be partially written to disk and eventually merged. If the used memory heuristics fails for some reason (i.e., because multiple index operations run at the same time), fixed index split sizes may be chosen via the [[Options#INDEXSPLITSIZE|INDEXSPLITSIZE]] and [[Options#FTINDEXSPLITSIZE|FTINDEXSPLITSIZE]] options. If [[Options#DEBUG|DEBUG]] is set to true, and if a new database is created from command-line, the number of index operations will be output to standard output; this might help you to choose proper split size. The following example shows how the output can look like for a document with 111 MB and 128 MB of available main memory: <pre>> basex -d -c"set ftindex; create db 111mb 111mb.xml"Creating Database....... 8132.44 ms (17824 KB)Indexing Text..... 979920 operations, 2913.78 ms (44 MB)Indexing Attribute Values..... 381870 operations, 630.61 ms (21257 KB)Indexing Full-Text.....|| 3 splits, 12089347 operations, 16420.47 ms (36 MB)</pre> The info string {{Code|3 splits}} indicates that three partial full-text index structures were written to disk, and the string {{Code|12089347 operations}} tells that the index construction consisted of appr. 12 mio index operations. If we set [[Options#FTINDEXSPLITSIZE|FTINDEXSPLITSIZE]] to the fixed value {{Code|4000000}} (12 mio divided by three), or a smaller value, we should be able to build the index and circumvent the memory heuristics.
=Updates=