0
在一个大的数据库,是它更快地执行查询如查询速度
select * from table where a = 1 and b = 2 or b = 3 or b = 4;
或
select * from table where a = 1 and b = 2;
select * from table where a = 1 and b = 3;
select * from table where a = 1 and b = 4;
我认为它取决于如果'a'是关键或索引或不... –
只是一个挑剔的笔记,第一个查询将返回比你想象的要多得多,因为缺少括号变量b。 'select * from table where a = 1 and(b = 2 or b = 3 or b = 4)' – Tommy