Home > database >  The CONVERT is the one inducing the inefficiency of the index
The CONVERT is the one inducing the inefficiency of the index

Time:09-24

SELECT * FROM table1 WHERE a='1';
SELECT * FROM table1 WHERE a=the CONVERT (1, CHAR);

Field is of type VARCHAR, has constructed the index, the first statement can use index, but the second was useless,

CodePudding user response:

Varchar and char type is not the same;
Is not the same as the character set can also cause index expires
  • Related