HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Existence of Missing Index in MySQL. Does it exist?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
existenceexistmysqldoesmissingindex

Problem

I have been working a bit with MySQL and SQL Server, and I have a question: if the "Missing Index" script exists in MySQL

In SQL Server I know that it shows the missing indices of each table in a database, and by that I would like to know if it exists in MySQL or something similar to this SQl Server script that can be executed.

Beforehand I would be very grateful.

Solution

There is another article here: https://stackoverflow.com/questions/30626876/how-to-find-missing-indexes-in-mysql

I, too, would recommend using the explain plan and looking at results. I have had instances where adding an index to a table actually slowed the results down to a crawl.

Here is an interesting way to look up columns that could possibly need indexed:
http://www.youdidwhatwithtsql.com/spotting-missing-indexes-mariadb-mysql/2036/

Again, like the author said, "a query I use for MySQL / MariaDB to spot any columns that might need indexing" [emphasis mine]

Context

StackExchange Database Administrators Q#175300, answer score: 2

Revisions (0)

No revisions yet.