The question of whether the fields in mysql sql are calculated or not.

Field id is of type int

select * from table where id="1";
select * from table where id=1;

Is there any difference in execution efficiency between the two statements? Is the first line id calculated?

I seem to be the same through explain, but why is there a statement similar to the first line in the slow query? In addition, there are some sql in the slow query through the explain test type is ref, scan lines are not many, and so on, but also used the index, why is it still a slow query?

Mar.05,2021

there is a process of implicit type conversion, which of course consumes computation.
MySQL:: MySQL 5.7 Reference Manual:: 12.2 Type Conversion in Expression Evaluation: https://dev.mysql.com/doc/ref.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9c2c0-18b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9c2c0-18b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?