Table Indexing
Table Indexing fast the data fetching from the table.
Main Index are used as follow
–PRIMARY KEY INDEX
–UNIQUE INDEX
The Index is Optional can be created after creating a table.
Example for Table Indexing
CREATE TABLE Country (
CountryCode CHAR(3) NOT NULL,
Language CHAR(30) NOT NULL,
IsOfficial ENUM(‘T’, ‘F’) NOT NULL DEFAULT ‘F’,
Percentage FLOAT(3,1) NOT NULL,
PRIMARY KEY(Country, Language)
)ENGINE = MyISAM COMMENT ‘Lists Language Spoken’
Create Indexes when creating a table, or add later
Show Index will show the index on table
Syntax
Show Index will show the index on table
Syntax
SHOW INDEX FROM <table>