.. include:: ../../../recorder.4.0/srcDoc/vars.rst .. _section-indexer-instances: ******************** 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. Indexing Instances ------------------ Instance indexing is used by *Replay Service* for the Instance History Replay (state of the world publication) feature (see :numref:`section-using-replay-instance-history` 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 :numref:`section-record-config-instance-indexing-tag` for more information). 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. Running the Indexer ------------------- The *Indexer* runs as a separate application. The script to run the executable is in ``/bin``. (See :numref:`section-doc-paths` for the path to NDDSHOME.) .. code-block:: bash rtirecordingindexer [options] .. _section-indexer-command-line-parameters: 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``. .. list-table:: Indexer Application Command-Line Parameters :name: IndexerHelp :widths: 38 62 :header-rows: 1 :class: longtable * - 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 [:] - Controls what type of messages are logged. |br| is the verbosity level for the service logs and 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.