some_other_column不是任何索引的一部分。primary_index_column是主键列;secondary_index_column有一个b树索引,基数为200 (根据MySQL)。以下是explain的结果:
mysql> explain select some_other_column from `table` order by primary_index_column limit要为第二个查询选择特定的执行计划?我不明白为什么它可以将索引用
我有两个表customer和order。我想用一个查询来更新两个表中的不同值。例如,customer表有city列,值为德国,order表有status列,值为hold,我想将德国更改为london,hold更改为resolved with one query。下面是查询
UPDATE customer,order INNER JOIN order ON cust