8. Indexing Application

Recording Service includes a command-line utility for indexing the database files.

There are two types of indexing: instance indexing and SQLite table indexing.

8.1. Indexing Instances

Instance indexing is used by Replay Service for the Instance History Replay (state of the world publication) feature (see Section 4.1.7 for more information). Replay Service will perform the indexing if the index is not present. While this may be acceptable in some cases, it can take a long time if the database is large. This command-line option offers offline indexing, which can be done before running Replay Service. Recall that Recording Service also offers a way to index instances while recording (see Section 3.3.6.3 for more information).

8.2. Indexing SQLite Tables

Table indexing improves the performance of Replay Service and Converter when accessing databases recorded with the builtin SQLite plugin. In this case, the indexer will go over all files and all available tables and create two SQLite indexes: one on the reception timestamp column, and another on the source timestamp column.

For a given table named T1, the indexer will create an index called T1_rt_idx based on the SampleInfo_reception_timestamp column, and another index called T1_st_idx based on the SampleInfo_source_timestamp.

When dealing with very large databases, having indexes on the timestamp column(s) can be extremely important because it can significantly improve performance.

8.3. Running the Indexer

The Indexer runs as a separate application. The script to run the executable is in <NDDSHOME>/bin. (See Section 1.3 for the path to NDDSHOME.)

rtirecordingindexer [options]

8.4. Indexer Command-Line Parameters

The following table describes all the command-line parameters available for the Indexer. To list the available parameters, run rtirecordingindexer -help.

Table 8.1 Indexer Application Command-Line Parameters

Parameter

Description

instances|tables

Required. Specifies the mode the command should work in. Default: instances

-dbDirectory

Required. The directory containing the SQLite database to be indexed.

-help

Shows help for the command.

-verbosity <service_level>[:<dds_level>]

Controls what type of messages are logged.
<service_level> is the verbosity level for the service logs and <dds_level> is the verbosity level for the DDS logs. Both can take any of the following values:

  • SILENT

  • ERROR

  • WARN

  • LOCAL

  • REMOTE

  • ALL

Default: ERROR:ERROR

-version

Prints the program version and exits.