We participate in the Amazon Service LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com

SQL EXPLAIN: The “ref” column

The “ref” column shows which columns or constants are compared to the index named in the “key” column to select rows from the table.

This comes right from the manual, but I have noticed that when the value is const, it means that you are comparing to a constant value rather than say, another column, but it does not tell you what that value is. The wording in the manual indicates it will tell you the constant’s value, but that is not correct.

The important takeaway here is that you can can see what is being compared to what. For example, a constant value to an index.