游客发表

关于MySQL索引知识的小妙招

发帖时间:2025-11-05 13:35:53

关于MySQL索引知识的小妙招
复制select * from t where a=1 and b=1 and c =1;     #这样可以利用到定义的关于索引(a,b,c),用上a,b,c  select * from t where a=1 and b=1;     #这样可以利用到定义的索引(a,b,c),用上a,b  select * from t where b=1 and a=1;     #这样可以利用到定义的索引(a,b,c),用上a,c(mysql有查询优化器)  select * from t where a=1;     #这样也可以利用到定义的b2b供应网索引(a,b,c),用上a  select * from t where b=1 and c=1;     #这样不可以利用到定义的索引(a,b,c)  select * from t where a=1 and c=1;     #这样可以利用到定义的索引(a,b,c),免费信息发布网但只用上a索引,索识b,引知c索引用不到  1.2.3.4.5.6.

    热门排行

    友情链接