MySQL Performance: How To Leverage MySQL Database Indexing

October 8, 2020 Liquid Web

Throughout this MySQL Performance Tutorial, we will cover some of the fundamentals of indexing. As part of the MySQL series, we will introduce capabilities of MySQL indexing, and the role it plays in optimizing database performance. Liquid Web recommends consulting with a DBA before making any changes to your production-level application.

In this video, we demonstrate how to do leverage MySQL database indexing.

Commands used:

'show index from' tablename

CREATE TABLE tableName (
ID int,
LName varchar(255),
FName varchar(255),
DOB varchar(255),
LOC varchar(255),
INDEX ( ID )
);

CREATE TABLE tableName (
ID int,
LName varchar(255),
FName varchar(255),
DOB varchar(255),
LOC varchar(255),
PRIMARY KEY (ID),
UNIQUE INDEX ( ID )
);

CREATE INDEX indexName ON tableName (ID, LName, FName, LOC);

CREATE UNIQUE INDEX indexName ON tableName (ID, LName, FName, LOC);

DROP INDEX indexName ON tableName;

Video by: Justin Palmer

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our <a href="https://www.liquidweb.com/blog">newsletter</a> to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
MySQL Performance: Identifying Long Queries
MySQL Performance: Identifying Long Queries

In this video, we demonstrate how to identify long running MySQL queries.

Next Video
How to Enable Piped Logging in Apache
How to Enable Piped Logging in Apache

In this video, we demonstrate how to enable piped logging in Apache.

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now