Disk consumption

Text index size

The amount of disk space a text search index uses depends highly on the nature of the text in each document. However, there is an approximately linear relationship between the disk space required for the text search index and the disk space required for the original data. Typically, the size of the index on the disk is 50 - 150% of the original text size. For example, on a table with an integer primary key the text search index for 100,000 20 KB documents is expected to require about 1100 MB of disk space (100,000 x 20 KB x 55%). The size of the text search index relative to the source documents depends on the following factors:
  • the average size of the document
  • the size of the document key (the primary key columns)
  • the number of sortable fields
  • the number and distribution of unique terms

During the index update, additional work space is needed. The intermediate space requirements are about a factor 2-3 times the final text search index size, provided the maximum segment size is not reached. The free space required is 2-3 times the maximum segment size. Disk space is reserved even after a segment merge if the old segments have been used in a search.

Log files

In addition to the db2diag.log file, Db2 Text Search generates trace and Configuration tool log files with messages from the Db2 Text Search server.

For an integrated Text Search server, the default log file location is db2tss/log directory. If you want Db2 database and text search logs in the same location, set the location to <instanceHome>/sqllib/db2dump/tslog on UNIX or <instanceProfilePath>\<instance_name>\db2tss\tslog on Windows platforms.

For the stand-alone setup, the default location for the Db2 Text Search server logs is <ECMTS_HOME>/log. You can change the default location during installation by setting the IA_LOG_PATH parameter in the response file.

In either case, ensure that the target location has sufficient free disk space for the log files. A minimum of 100 MB of free disk space is required. Without sufficient space for the log files, the text search service stops logging and throws a disk full error.

Administrative tables

If you do not specify a table space for the administrative tables for the text search index when you run the CREATE INDEX FOR TEXT command, the administrative tables are created in the table space that contains the base table. To determine the appropriate location, consider the following information:
  • Staging table for the text index
    The staging table holds the reference to rows that have been updated in the base table for an incremental update of the text index. This table is automatically cleaned up with each update:
    Size = 
     number of rows for index updates * (length of primary key of base table + 18)
  • Event table for the text index

    The event table contains status information about text index processing, including errors and warnings during an index update. In the worst case, if each document is rejected due to a nonfatal error, the number of events is the number of documents plus a few begin and end messages for the update process. The event table is not cleaned automatically, and increases in size until a CLEAR EVENTS FOR INDEX operation is completed.

    Event table size = 
      number of events * (length of primary key of base table + 1050)