Add a partition index to this table.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Sub addPIndex( _ 
   ByVal field_name As String,  _ 
   ByVal primary As Boolean,  _ 
   ByVal partition_separators As String(),  _ 
   ByVal normalized As Boolean _ 
) _
    Implements INetricsTable.addPIndex
C#
public void addPIndex(
   string field_name,
   bool primary,
   string[] partition_separators,
   bool normalized
)
C++
public:
 void addPIndex(
   String field_name,
   bool primary,
   array<String>^ partition_separators,
   bool normalized
) sealed 
J#
public void addPIndex(
   string field_name,
   bool primary,
   string[] partition_separators,
   bool normalized
)
JScript
public  function addPIndex(
   field_name : String,
   primary : bool,
   partition_separators : String[],
   normalized : bool
)

Parameters

field_name
The name of the field that is to be indexed.
primary
If true this is a primary index, otherwise it is a secondary index.
partition_separators
This is an array that defines the upper bound of each partition. The values MUST be in sorted order (as per the type of the named field) least to greatest. The size of the array defines the number of partitions.
normalized
If true and the field is a string value the normalized values are indexed. Thus this index will work with the case insensitive comparison operators and not work with the standard operators.

Implements

INetricsTable.addPIndex

Remarks

This method is used to add a partition index to the table. These indexes can be used to speed the processing of Filtering Predicates. A partition index groups records in the table into a set of partitions based on the value of the named field. The number of partitions and range of values that are placed in each partition must be defined when the index is created. These are defined by the partition_separators parameter. There is a limit on the number of partitions in an index, currently set to 1026. As there are two predefined partitions for empty and invalid values and a final partition for values greater than the last separator this limits the total number of separators to 1023.

Partition indexes may be defined as either Primary or Secondary. Primary indexes give a much better performance improvement, especially on large tables and with highly selective predicates, but at a cost of significantly larger memory requirements and slightly slower load times. The additional memory overhead for a primary index is much larger if more than one primary index is defined for a table.

If you are using filtering predicates properly defined partitioned indexes in conjunction with a properly formulated predicate expression can dramatically improve performance on large tables. It is recommened that you consult with your Netrics representative to determine the optimal use of partition indexes for your particular situation.

See Also