Defining a Table
Administrators define tables as needed to structure data. To define a table within the data grid, complete this task.
The examples in these steps illustrate adding commands to a configuration script. When the script is complete, the administration tool executes the script to define the table.
Alternatively, you could execute each step immediately as a separate administration tool command, instead of accumulating them in a script.
Note: Statistics for a table or an index must be enabled at creation time and cannot be enabled or disabled afterward. For more information, see
Enabling Statistics.
Prerequisites
Either the realm must contain a valid data grid definition, or your configuration script file must contain commands to create a valid data grid definition.
Procedure
What to do next
Note: If an index is added or deleted from a table, re-indexing occurs in the background. To verify that re-indexing has been completed look for log entries such as these in the
tibdgnode log file:
2017-02-23 09:54:35.309 info ridx: reindexing of table t3 started 2017-02-23 09:54:35.640 info ridx: table t3 has been reindexed
You can repeat this task to define additional tables.
- Column Names
Choose column names that follow these rules for SQL identifiers. - Secondary Indexes
A secondary index can increase query efficiency by reducing the number of rows to examine. - Enabling Statistics
Set the row_counts attribute during table or index create to exact. - Row Expiration
Rows are considered expired when they have exceeded their configured time-to-live (TTL) value. Ordinarily, rows in a table are not deleted until a client explicitly deletes them. In some situations however, the data in the rows might only remain valid or relevant for a short span of time. Leaving these rows in the table indefinitely consumes disk space and in some situations can slow down your queries. The row expiration feature is designed to remove outdated rows.
Copyright © Cloud Software Group, Inc. All rights reserved.