Indexes and Views in MySql
INDEX Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. Simple Index: An index created on a single column of a table. Syntax: create INDEX index_name ON tablename; Composite Index: An index created on more than one column of a table . Syntax: create INDEX index_name ON tablename(column_name,column_name); Simple Unique Index: Same as simple ixdex but key must be unique. Composite Unique Index: Same as composit index but key must be unique. DELETE INDEX: drop INDEX index_name ON table_name; VIEW: ...