Mysql plus indexing is slower than no indexing. Why?

this table has more than 400,000 data that is not indexed

uname datetime

The same is true of

and composite indexes.
I don"t know how to ask all of you for beginners

Php
Mar.04,2021

for columns with a lot of duplicate data, it is not suitable to simply build an index, because the amount of data after Filter is still very large, and the index is walking through the table first, so it is very slow

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