它有以下索引:*************************** 13. row ***********************然而,令我惊讶的是,它几乎选择使用主键索引来扫描尽可能多的行。以下几点看起来毫不含糊(而且明显)优越:
mysql> explain select * from `table` USE INDEX (myindex) WHERE (`table`.我知道它可能重视顺序读取,但为什么它会选择2000行的索引
----------------+------+-----+---------------------+-----------------------------+1 row in set (0.00 sec)
上面的索引是使用的,但下面的索引不使用。mysql> explain select runtime_id from tabl
这就是我的迁移。我希望id字段是自动递增的,但不是主字段。有可能吗?此迁移抛出异常Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key $table->increments('id');
$table->unsigned