CREATE INDEX command creates an index on one or more existing columns from a table. Indexes cannot be seen by the user of a database; they just help speed up queries.
CREATE INDEX index ON table (column1, column2);
Note: Tables with indexes update slower, so indexes should generally be used on columns that will be searched often but not updated frequently.
This example creates an index called
idx_student_name on the
student_name column in the
CREATE INDEX idx_student_nameON students student_name;