Mysql indexes Shortcuts

Mysql indexes

Inside a table:
INDEX(indexed_column)

Multiple Column Index
INDEX(indexed_column, indexed_column2)

Add Index to a table
ALTER TABLE table_name ADD INDEX(indexed_column)

Show Indexes:
SHOW INDEXES FROM table_name;

Remove Index
ALTER TABLE table_name DROP INDEX index_name;

No comments:

Post a Comment

Setting program_name in mysql session_connect_attrs allows you to see the name of the program connected

I am using mysql for quite some time now. I have noticed that looking at client connections using mysql workbench so an interesting column ...