Indexes
Indexes are a special system that databases use to improve the overall performance. By setting indexes on your tables, you are telling MySQL to pay particular attention to that column (loosely said). In fact, MySQL creates extra files to store and track indexes efficiently.
MySQL allows for up to 32 indexes for each table, and each index can incorporate up to 16 columns. While a multicolumn index may not seem obvious, it will come in handy for searches frequently performed on the same set of multiple columns (e.g., first and last name, city and state, etc.).
On the other hand, you should not go overboard with indexing. While it does improve the speed of reading from databases, it slows down the process of altering data in a database ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access