第一行花费2.74秒,第二行花费7.07秒。primary_index_column是主键列;secondary_index_column有一个b树索引,基数为200 (根据MySQL)。以下是explain的结果:
mysql> explain select some_other_column from `table` order by primary_index_column limit要为第二个查询选择特定的执行计划?我不明白为什么它可以将
我有一张名叫account_info的桌子。当我运行select id from account_info limit 0, 10时,结果如下。
为什么身份证是不同的?当我将order by id添加到这两个sql中时,结果是相同的。结果的顺序似乎才是最重要的。但是我认为当没有order by id时,select id from account_info limit 0, 10和select * from account_info共享相同的默