[Mysql]查询优化 文章作者 创建者:shaojingliu 文章日期 2020年9月18日 类别 属于 未分类 只查询前N个记录的数据 select id from tablename where id in (select id from ( select id from tablename order by id desc limit 10) as id ); // 即从tablename中取前10个,再查询