Skip to contents

Create a set of indexes on the tables in an SQLite SEND database to optimize performance of extraction of data from the different functions in the package.

Usage

dbCreateIndexes(dbToken, replaceExisting = FALSE)

Arguments

dbToken

Mandatory
Token for the open database connection (see initEnvironment).

replaceExisting

Mandatory, character
Whether an already existing set of indexes in the database may be replaced by a new set of indexes.

Details

All the indexes are named <domain name>_sendigr_<nn> - .e.g. TS_sendigr_01.
If any additional indexes are manually created in the database, avoid to include 'sendigr' in the name, because all existing indexes with that included in the name will be initially deleted when execution the function with replaceExisting = TRUE.
It's recommended to wait with the creation of the indexes until the major amount of studies to be loaded in to the database are loaded.

The database must be an SQLite database - no other types of databases are supported by this function.

Examples

if (FALSE) {
createAllIndexes(myDbToken)
}