I'm using MySQL and I'm reading in some places that using CHAR in indexed columns is 20% faster than use VARCHAR. In other places seems that its benefit is only when the table doesn't have any VARCHAR column. Is that true?
The information that I want store is a GUID. Is a better option store the data in a BINARY or in a CHAR if the database uses character set utf8? It's worth convert my data to BINARY every time that I want insert, update or query filtering by the GUID? I prefer faster data access than save disk usage.
BINARYis the fastest way to store the GUID information, if you are into micro optimizations.BINARYvsVARBINARY-BINARYis yet again faster because MySQL won't have to compute the actual length it has to save since allBINARYcolumns will be of the fixed-width.VARCHARcolumns and aBINARYcolumn and I do a query filtering by theBINARYcolumn it will be faster? The other columns don't matter?