Source: medium.com

Indexing Table in MySQL

Category: MySQL

A few days ago, I have uploaded my program to production, after ran for two days, my database got 20.000 rows stored data. I thought “This is just 20K data, how about 1 million data, RIP my program haha”. So I decided to make index for my table, the primary purpose is to provide an ordered representation of the indexed data through a logical ordering which is independent of the physical ordering.

This is my query for create index.

Note that operations like UPDATE or INSERT become slower because they are actually two writing operations in the filesystem (one for the table data and one for the index data).
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners