Follow

Follow

Querying for Data in MySQL is Slow

Bryan's photo
Bryan
·Dec 17, 2022·

Trying to query the MySQL database is slow (millions of records in table)

Example query:

SELECT * FROM my_table WHERE code='X87L9D82NB';

Just add an index to the column that is frequently used to query for data

Query to add index:

CREATE INDEX index_name ON table_name (column_name);
 
Share this