Using a quoted number for a column whose type is defined as a numeric one has a worse performance value compared to using an unquoted value, since the server must convert the string to the desired type during query compilation. In addition, this has no effect, and it will probably be difficult for you to click on the target. (Note that both "0" and "0" are sent to the server as strings, they must be converted to the internal type of the field before using it anyway, since sending "0" simply forces an extra step. First the parser parses "0", then the optimizer notices that the column type is numeric and converts it accordingly. OTOH, with 0, the parser will parse it as a numeric value [save as long int iirc], and then notice the field type and convert the numeric value for match field type, if necessary. Thus, the difference is really insignificant).
However, using an unquoted number for a column whose type is defined as text is a very bad idea, as this means that the server cannot use any index in the column to resolve the query.
It is important to understand that, although any line that numbers exactly one numeric value has an almost infinite number of lines that are numbered for a given numeric value. Consider "0", "0E0", "0.0", etc. This explains why quoting a constraint when a field is numeric is not very bad, there is only an operation to perform, and it explains why NOT quoting a constraint is bad when the field is not numeric, as this means that the server must make each line in table before the number before performing the comparison, thereby forcing a table scan.
source share