select *
from sometable
where column1='somevalue' and column2='someothervalue'
Run Code Online (Sandbox Code Playgroud)
对于上面的查询,如果column1和column2都有索引表ix1和ix2,那么上面的例子使用哪个索引?假设'somevalue'和'someothervalue'是表中的现有值,column1和column2具有非唯一值.
如果和被替换为或者,它会有什么不同?