Developer Reference : Platform Management : Distributed Tuning Interface (DTI) Guide : Distributed Tuning Interface Reference : PvAddIndex()
 
PvAddIndex()
Adds indexes specified in indexList to the existing table and to the underlying data file.
Header File: ddf.h (See also Header Files)
Function First Available In Library: w3dbav75.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also Link Libraries)
Syntax
PRESULT PvAddIndex(
   WORD            dictHandle,
   LPCSTR          tableName,
   INDEXMAP*       indexList,
   WORD            indexCount);
Arguments
 
In
dictHandle
Handle of an open dictionary returned by PvOpenDatabase().
In
tableName
Name of the table where the indexes will be added.
In
indexList
Array of index definitions.
In
indexCount
Number of indexes in the indexList array.
Return Values
 
PCM_Success
The operation completed successfully.
PCM_errFailed
The operation did not complete successfully.
PCM_errInvalidDictionaryHandle
The specified dictionary handle does not exist.
PCM_errTableNotFound
The specified table was not found.
PCM_errMemoryAllocation
An error occurred during memory allocation.
PCM_errInvalidIndexName
The specified index name is invalid.
PCM_errColumnNotFound
The specified column was not found in the table.
Remarks
You must first open a dictionary successfully using PvOpenDatabase().
The table specified by tableName must exist in the dictionary specified by dictHandle.
You will need to allocate and release INDEXMAP array used to describe the indexes.
See Also
PvStart()
PvOpenDatabase()
PvDropIndex()
PvDropIndexByName()
PvCloseDictionary()
PvStop()