当前位置: 首页 > news >正文

哪些网站上可以做租车免费商业wordpress主题

哪些网站上可以做租车,免费商业wordpress主题,wordpress音乐插件百度云,怀来网站建设在MySQL中#xff0c;即使表中没有数据#xff0c;查询优化器也会考虑使用索引来执行查询。但在某些情况下#xff0c;查询优化器可能会选择不使用索引#xff0c;这通常是基于成本效益分析的结果。 表中没有任何数据时#xff0c;无论是否使用索引#xff0c;查询结果都…在MySQL中即使表中没有数据查询优化器也会考虑使用索引来执行查询。但在某些情况下查询优化器可能会选择不使用索引这通常是基于成本效益分析的结果。 表中没有任何数据时无论是否使用索引查询结果都是一样的。但直接扫描表全表扫描可能比使用索引更快因为即使是空表访问索引也需要一定的开销但并不会带来性能提升。 create table test(id int primary key, name varchar(10)); Query OK, 0 rows affected (0.10 sec)mysql explain select * from test where id1; ------------------------------------------------------------------------------------------------------------------------------ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | ------------------------------------------------------------------------------------------------------------------------------ | 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | no matching row in const table | ------------------------------------------------------------------------------------------------------------------------------ 1 row in set, 1 warning (0.00 sec)mysql insert into test value(1, a); Query OK, 1 row affected (0.01 sec)mysql explain select * from test where id1; ---------------------------------------------------------------------------------------------------------- | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | ---------------------------------------------------------------------------------------------------------- | 1 | SIMPLE | test | NULL | const | PRIMARY | PRIMARY | 4 | const | 1 | 100.00 | NULL | ---------------------------------------------------------------------------------------------------------- 1 row in set, 1 warning (0.00 sec)使用如下SQL语句建表并使用b列作为条件查询。按照索引最左匹配原则此时应该无法使用索引。但如果表中只包含主键列和索引列此时查询优化器还是会使用索引。示例如下 CREATE TABLE t1 (id int NOT NULL,a int DEFAULT NULL,b int DEFAULT NULL,c int DEFAULT NULL,PRIMARY KEY (id),KEY inx_abc (a,b,c) );CREATE TABLE t2 (id int NOT NULL,a int DEFAULT NULL,b int DEFAULT NULL,c int DEFAULT NULL,d int DEFAULT NULL,PRIMARY KEY (id),KEY inx_abc (a,b,c) );# 插入两条数据 insert into t1 value(1, 1, 1, 1); insert into t2 value(1, 1, 1, 1, 1); explain select * from t1 where b1; ---------------------------------------------------------------------------------------------------------------------------- | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | ---------------------------------------------------------------------------------------------------------------------------- | 1 | SIMPLE | t1 | NULL | index | inx_abc | inx_abc | 15 | NULL | 1 | 100.00 | Using where; Using index | ---------------------------------------------------------------------------------------------------------------------------- 1 row in set, 1 warning (0.00 sec) explain select * from t2 where b1; ----------------------------------------------------------------------------------------------------------- | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | ----------------------------------------------------------------------------------------------------------- | 1 | SIMPLE | t2 | NULL | ALL | NULL | NULL | NULL | NULL | 1 | 100.00 | Using where | ----------------------------------------------------------------------------------------------------------- 1 row in set, 1 warning (0.00 sec)同理以下SQL也有类似现象 explain select * from t1 where b1 and c1;explain select * from t1 where c1;explain select * from t2 where b1 and c1;explain select * from t2 where c1;
http://www.w-s-a.com/news/18948/

相关文章:

  • 网站html模板免费下载公司的网站建设费用入什么科目
  • 高中生做网站网页网页制作教程零基础学会
  • 做金融网站有哪些要求WordPress站内搜索代码
  • 济南网站怎么做seowordpress注册发邮件
  • 珠海网站设计平台东莞市手机网站建设平台
  • 网站开发文档合同怎么在wordpress导航条下方加入文字广告链接
  • 网站建设需怎么做有网站怎么做企业邮箱
  • 网站制作流程视频教程小程序多少钱一年
  • 暗网是什么网站花都网站建设哪家好
  • 贵州网站开发流程晋江论坛手机版
  • 网站建设丿金手指谷哥14阿里巴巴官网电脑版
  • 网站开发招聘信息匿名ip访问网站受限
  • 网站转app工具网站规划建设与管理维护大作业
  • flash是怎么做网站的.net购物网站开发
  • 烟台网站建设求职简历品质商城网站建设
  • 做百度外链哪些网站权重高点做网站具备的条件
  • 怎么样用ppt做网站红番茄 网站点评
  • 建设银行河北分行招聘网站哪里能找到网站
  • 兰州营销型网站网站建设收费标准
  • 网站首页动图怎么做自己做网站很难
  • 自建网站如何盈利推广引流最快的方法
  • 网页设计网站结构图怎么弄网站用户 分析
  • 企业手机网站建设策划天津网页设计工作
  • 苏州vr全景网站建设公司怎么讲解网页的制作技术
  • 徐州智能建站怎么做苏州建设网站首页
  • 网站支付功能报价wordpress主页透明
  • asia域名的网站宁波模板建站源码
  • 官网网站怎么做个人网站盈利
  • 青龙桥网站建设网站同时做竞价和优化可以
  • 沭阳建设网站婴儿辅食中企动力提供网站建设