Query execution was interrupted SELECT * FROM ***_ecms_mingju WHERE classid='3' and id >= ((SELECT MAX(id) FROM ***_ecms_mingju where classid='3')-(SELECT MIN(id) FROM ***_ecms_mingju where classid='3')) * RAND() + (SELECT MIN(id) FROM ***_ecms_mingju where classid='3') ORDER BY id limit 12