SQL Getting Started Tutorial: SQL CREATE INDEX syntax
The table in which the index statement is created to create the metric.
Metrics allow database applications to find data quickly, without reading the entire table.
Index
The index can be built in a table to find data more quickly and efficiently.
Users cannot see metrics, they are only used to speed up search/query.
Note: Table updates and indexes require more time than updating a table (because the metrics also need to be updated). So you should only create indicator columns (tables) that will be frequently on the search.
SQL syntax for creating indexes
Creates a table for an index. Duplicate values are allowed:
CREATE INDEX index_name
On table_name (COLUMN_NAME)
The SQL create unique index syntax creates a unique index for seating. Duplicate values are not allowed: CREATE UNIQUE INDEX index_name
On table_name (COLUMN_NAME) SQL CREATE index instance bar. The following SQL statement creates an index named "Pindex" on the column "P" table: Create INDEX Pindex
On Persons (LastName) If you want to create an exponential combination of columns, you can list the column names in parentheses, separated by commas: Create INDEX Pindex
On Persons (LastName, FirstName)