Mysql Index related interview questions

the problem is this:

previous question:

wherewhere20

question:

1. 20where
2. 20where
May.22,2021

  1. cannot
  2. choose fields with high discreteness to be indexed, and index fields as few as possible
The higher the cardinality, the greater the chance that MySQL uses the index when doing joins.
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-1e3f513-64e3e.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-1e3f513-64e3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?