假设我有这张桌子:
create table table_a (
id int,
name varchar(25),
address varchar(25),
primary key (id)
) engine = innodb;
当我运行此查询时:
select * from table_a where id >= 'x' and name = 'test';
MySQL 将如何处理它?它会首先提取所有 id(假设 1000 行)然后应用 where 子句 name = 'test'?
还是在寻找 id 时,它已经同时应用了 where 子句?