如何通过RAND()函数优化MySQL的顺序?
mysql-slow.log
.
ORDER BY RAND()
PHP
SELECT accomodation.ac_id, accomodation.ac_status, accomodation.ac_name, accomodation.ac_status, accomodation.ac_imagesFROM accomodation, accomodation_categoryWHERE accomodation.ac_status != 'draft' AND accomodation.ac_category = accomodation_category.acat_id AND accomodation_category.acat_slug != 'vendeglatohely' AND ac_images != 'b:0;'ORDER BY RAND()LIMIT 1
相关分类