关于这段SQL语句如何优化?

SELECT COUNT(1) FROM (
SELECT m.* FROM (
SELECT id, send_user_id, receive_user_id, send_time, receive_time, content, customer_id, system_id, receive_user_name, send_user_name
FROM tbl_message WHERE send_time >= 1651334400 AND send_time < 1653840000 ORDER BY send_time DESC, id DESC
) AS m ORDER BY m.send_time DESC, m.id DESC
) AS t
inner join 
tbl_user AS u on u.id = t.receive_user_id and u.type = 2 

这个你试试看,试了边城元元的,执行后报错