Problems related to mysql Index

problem description

1. A certain field of a table has a high degree of repetition, so how much repetition is it not suitable for indexing?
2. If a table does not build an index other than the primary key, how old will the table be, such as a slow query?

Jan.27,2022

1, no specific proportion, consider factors, column query efficiency, differentiation, but also consider
2. The size of the table without index has nothing to do with the number of data rows, but has light on the data size

.

MySQL index principle and slow query optimization

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-1b37251-2c068.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-1b37251-2c068.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?