MySQL引起索引失效的原因

2023-11-15

原创92.4 发布于2018-11-30 19:35:07 阅读数 451  收藏
展开
查看索引结构
mysql> show index from staffs;
+--------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table  | Non_unique | Key_name         | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+--------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| staffs |          0 | PRIMARY          |            1 | id          | A         |           3 |     NULL | NULL   |      | BTREE      |         |               |
| staffs |          1 | idx_name_age_pos |            1 | NAME        | A         |           3 |     NULL | NULL   |      | BTREE      |         |               |
| staffs |          1 | idx_name_age_pos |            2 | age         | A         |           3 |     NULL | NULL   |      | BTREE      |         |               |
| staffs |          1 | idx_name_age_pos |            3 | pos         | A         |           3 |     NULL | NULL   |      | BTREE      |         |               |
+--------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1
2
3
4
5
6
7
8
9
全值匹配我最爱
查询的字段或查询条件字段与建立的索引字段一一对应

mysql> explain select * from staffs where NAME = 'July' and age = 23 and pos = 'dev';
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref               | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 140     | const,const,const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
1 row in set (0.00 sec)

# type为ref,且用到了索引
1
2
3
4
5
6
7
8
9
最佳左前缀法则
含义:如果为多值索引,要遵守最左前缀法则。指的是查询从索引的最左列开始并且不跳过索引中的列。
解释:查询的字段或者条件字段可以不与索引字段全部一致,但开头必须一致,且中间不能隔断。
带头大哥不能死
中间兄弟不能断
# 只有前两个
mysql> explain select * from staffs where NAME = 'July' and age = 23;
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref         | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 78      | const,const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
1 row in set (0.00 sec)

# 没有‘大哥’
mysql> explain select * from staffs where age = 23 and pos = 'dev';
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | NULL          | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

# ‘兄弟’间断
mysql> explain select * from staffs where NAME = 'July' and pos = 'dev';
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref   | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 74      | const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
分析:没有‘大哥’就像楼梯没有第一层一样。‘兄弟’间断就像楼梯中间少了一层。
在索引列上做任何操作(计算、 函数、(自动or手动)类型转换),会导致索引失效而转向全表扫描
# 没有在索引列上做操作
mysql> explain select * from staffs where name='July';
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref   | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 74      | const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
1 row in set (0.01 sec)

# 在索引列上做了操作
mysql> explain select * from staffs where left(name,4)='July';
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | NULL          | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
存储引擎不能使用索引中范围条件右边的列
分析以下代码可以知道,当索引出现范围条件后,其后边的索引列将不能被使用(出现范围条件本身的这个字段还可以被使用)
mysql> explain select * from staffs where name='July' and age=22 and pos='dev';
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref               | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 140     | const,const,const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------------------+------+-----------------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name='July' and age>15 and pos='dev';
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
| id | select_type | table  | type  | possible_keys    | key              | key_len | ref  | rows | Extra                 |
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
|  1 | SIMPLE      | staffs | range | idx_name_age_pos | idx_name_age_pos | 78      | NULL |    1 | Using index condition |
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name='July' and age=15;
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref         | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 78      | const,const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
尽量使用覆盖索引(只访问索引的查询(查询列和索引列保持一致)),减少select*
mysql> explain select * from staffs where name='July' and age=15;
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref         | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 78      | const,const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+-----------------------+
1 row in set (0.00 sec)

mysql> explain select name,age from staffs where name='July' and age=15;
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+--------------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref         | rows | Extra                    |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+--------------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 78      | const,const |    1 | Using where; Using index |
+----+-------------+--------+------+------------------+------------------+---------+-------------+------+--------------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
MySQL在使用不等于(<>或!=)时无法使用索引,会导致全表扫描
mysql> explain select * from staffs where name!='July';
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys    | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | idx_name_age_pos | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name='July';
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref   | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 74      | const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
is null和is not null也无法使用索引
mysql> explain select * from staffs where name is not null;
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys    | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | idx_name_age_pos | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name is null;
+----+-------------+-------+------+---------------+------+---------+------+------+------------------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra            |
+----+-------------+-------+------+---------------+------+---------+------+------+------------------+
|  1 | SIMPLE      | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL | Impossible WHERE |
+----+-------------+-------+------+---------------+------+---------+------+------+------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
like以通配符开头(%abc),MySQL将无法使用索引,导致全表扫描
mysql> explain select * from staffs where name like'%July%';
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | NULL          | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name like'%July';
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | NULL          | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name like'July%';
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
| id | select_type | table  | type  | possible_keys    | key              | key_len | ref  | rows | Extra                 |
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
|  1 | SIMPLE      | staffs | range | idx_name_age_pos | idx_name_age_pos | 74      | NULL |    1 | Using index condition |
+----+-------------+--------+-------+------------------+------------------+---------+------+------+-----------------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
解决%不能在左边
使用覆盖索引

字符串不加单引号引起索引失效
mysql> explain select * from staffs where name = '2000';
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
| id | select_type | table  | type | possible_keys    | key              | key_len | ref   | rows | Extra                 |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
|  1 | SIMPLE      | staffs | ref  | idx_name_age_pos | idx_name_age_pos | 74      | const |    1 | Using index condition |
+----+-------------+--------+------+------------------+------------------+---------+-------+------+-----------------------+
1 row in set (0.00 sec)

mysql> explain select * from staffs where name = 2000;
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys    | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | idx_name_age_pos | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
注意
在sql中varchar一定要加单引号
应该避免隐式或显式的发生类型转换
or也会引起索引失效
mysql> explain select * from staffs where name = 'July' or age =20;
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
| id | select_type | table  | type | possible_keys    | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | staffs | ALL  | idx_name_age_pos | NULL | NULL    | NULL |    3 | Using where |
+----+-------------+--------+------+------------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)
1
2
3
4
5
6
7
[优化总结口诀]
全值匹配我最爱,最左前缀要遵守;
带头大哥不能死,中间兄弟不能断;
索引列上少计算,范围之后全失效;
LIKE百分写最右,覆盖素引不写星;
不等空值还有or,索引失效要少用;

点赞
————————————————
版权声明:本文为CSDN博主「92.4」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zyp1376308302/article/details/84639977

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

MySQL引起索引失效的原因 的相关文章

  • 如何在 MySQL 中启用严格 sql_mode?

    我怎样才能启用严格sql mode在 MySQL 中 我想从 SQL 中获取数据并在中处理相同的数据strict mode 我现在的sql mode is mysql gt SELECT sql mode sql mode NO ENGIN
  • 如何绑定值 INSERT INTO mysql perl

    我有下面的代码可以工作 但我需要知道如何绑定它们以确保安全 如果我只是将 new row 替换为 并将其放入执行中我收到错误 感谢您的帮助 foreach my field account field order new row param
  • 从两个表中搜索然后删除

    我有两个包含成员数据的表 与 member id 列链接 我需要搜索所有记录email列以 pl 结尾 然后 我需要为此删除两个表中的所有记录 基于 member id 是否可以通过一条 SQL 语句完成此操作 SELECT member
  • Rails 3 按字段排序和最后

    您好 我对 Rails 3 2 和订购有疑问 当想要按字段对集合进行排序时 调用时 last ActiveRecord行为怪异 gt gt User order FIELD id 1 User Load 0 4ms SELECT users
  • Codeigniter $this->db->reconnect();用法

    I m not自动加载数据库 因为我的应用程序的大多数页面don t需要数据库处理 否则整个事情会变慢 我想要做的是 当数据库已经存在时 不要建立与数据库的新连接 而是使用它而不是打扰服务器数据库 那么我该如何实施 this gt db g
  • MySQL 创建和更新时的 CURRENT_TIMESTAMP

    我想定义一个有 2 个 TIMESTAMP 字段的表 如下所示 CREATE TABLE msgs id INT PRIMARY KEY AUTO INCREMENT msg VARCHAR 256 ts create TIMESTAMP
  • 在 ASP.NET MVC 中使用 MySQL 的 AccountController

    在 Visual Studio 中创建默认的 ASP NET MVC 项目会设置一个可以在其中注册用户的基本项目 我将如何继续更改它以使用 MySQL 服务器而不是 SQLServer 现在可以使用了 安装最新的 Connector NET
  • Mysql为简单频繁查询创建排序索引性能

    我正在处理一个包含大约 400 万条消息条目的 mysql 表 并尝试根据时间戳选择最新的 50 条消息 另一个要求是返回的消息不以固定前缀开头 问题是单个查询大约占用 25 的 cpu 并且最多需要 1 5 秒 该查询经常由多个客户端执行
  • 为什么 sql 字段名称中不应该包含逗号?

    人们一直告诉我列名中不应包含空格 我只是想知道 这是为什么 这是我为学校创建的一些数据库表遇到的问题 字段名称包括 Preble 和 Darke 相反 它们需要是 普雷布尔县 俄亥俄州 和 达克县 俄亥俄州 如果它们是行名称 我只需创建一个
  • UNIX时间记录时区吗?

    我想问一下UNIX时间 UNIX时间是否记录时区 我将托管从美国芝加哥移至 JST 问题是我的整个 MySQL 数据库都有 UNIX 时间 芝加哥 美国时区 的记录 我有一个 PHP 代码来显示之前的时间 例如 3 天前 昨天等 当我搬到新
  • MySQL中是否有类似Oracle中“level”的函数[重复]

    这个问题在这里已经有答案了 我面临一个场景 如果输入是 10 我想要一个数字序列 1 2 3 10 在甲骨文中levelfunction 提供了该功能 我想知道如何在 MySQL 中执行相同的任务 谢谢 您可以在 mysql 中使用此查询
  • 使用 pip3 安装 mysqlclient 时遇到问题

    我正在尝试使用 Django 设置 python 3 6 环境 安装说明说我应该安装 mysqlclient 才能连接到 mySQL 我明白了 dennis django sudo H pip3 install mysqlclient Co
  • 按 MAX(time) WHERE time <= x 选择最近的 MySQL 行

    我正在选择 MySQL 表的最新条目 SELECT MAX time as most recent userID FROM TableName GROUP BY userID ORDER BY most recent DESC 我的问题是
  • MySQL 错误 1290 (HY000) --secure-file-priv 选项

    我试图在我的脚本中使用以下代码将 MySQL 脚本的结果写入文本文件 SELECT p title p content c name FROM post p LEFT JOIN category c ON p category id c i
  • 为 Mariadb 安装连接器 C

    所以 我想使用 Mariadb 有一个连接器 C https downloads mariadb org connector c https downloads mariadb org connector c 我该如何安装它 坦白说 它的文
  • MySQL 中的断言

    我有一个针对大型数据库运行的 SQL 脚本 我想在开始时提出几个简单的查询 作为健全性检查 有没有办法在MySQL中写断言 或者任何类型的 选择 如果它与该值不匹配 则中止整个脚本 一些疯狂的代码 要点是 SET可能会引发 mysql 变量
  • PDO fetch() 失败时会抛出异常吗?

    有没有方法PDO语句 fetch http php net manual en pdostatement fetch php如果 PDO 错误报告系统设置为抛出异常 则在失败时抛出异常 例如 如果我设置 PDO ATTR ERRMODE g
  • 从数据库生成 XML 时出现 PHP 编码错误 [关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我正在尝试获取一个简单的 PHP 服
  • 如何使用实体框架设置连接字符串

    我将 EF6 与 MySQL 结合使用 并有一个用于多个数据库的模型 我希望能够在我的表单中设置连接设置 如何以编程方式设置模型的连接字符串 你应该使用EntityConnectionFactory这就是您所需要的 public strin
  • RMySQL fetch - 找不到继承的方法

    使用 RMySQL 我想将数据从数据库加载到 R 中的数据帧中 为此 我使用以下代码 R连接数据库 con lt dbConnect MySQL user root password password dbname prediction h

随机推荐

  • 鲁棒优化(4):通过yalmip中的kkt命令实现CCG两阶段鲁棒优化

    两阶段鲁棒优化的原理推导部分 已经较多的文章进行分析 目前大部分同学面临的问题是 子问题模型中存在的双线性项该如何处理 目前 主流方式是 采用对偶定理或KKT条件 将第二阶段的双层问题变成单层问题 简略的思想如下 首先是原始的两阶段模型 对
  • c++中std::condition_variable最全用法归纳

    前言 建议阅读以下文章前需先对建立 std thread 多线程与std mutex 锁有一定程度的熟悉 std thread最全用法归纳 std mutex最全用法归纳 概括 使用 std condition variable 的 wai
  • 【代码分析】TensorRT sampleMNIST 详解

    目录 前言 代码分析 Main入口 网络构建 build 阶段 网络推理 infer 阶段 释放资源 前言 TensorRT 的 hello world 程序sampleMNIST是众多TensorRT初学者很好的起点 本文旨在详细分析sa
  • 使用PHP来简单的创建一个RPC服务

    RPC全称为Remote Procedure Call 翻译过来为 远程过程调用 主要应用于不同的系统之间的远程通信和相互调用 比如有两个系统 一个是PHP写的 一个是JAVA写的 而PHP想要调用JAVA中的某个类的某个方法 这时候就需要
  • VScode tab缩进太小 空格长度太小问题(Ubuntu)

    一 问题描述 Ubuntu18 04 安装vscode后 发现tab的缩进太小 初以为是tab的空格数没设置对 经确认后 没问题 一个tab是四个空格 下面两图分别是异常和正常的缩进显示 二 原因分析 在我的另一台虚拟机 ubuntu16
  • Google App Engine对Java支持情况一览

    Google App Engine对Java支持情况一览 http developer 51cto com 2009 04 09 11 06 杨赛 译 51CTO com 我要评论 0 Google App Engine的Java支持已发布
  • 华为OD机试-快递运输

    Online C compiler to run C program online include
  • Java程序的三种流程结构

    1 顺序结构 按照顺序一句一句执行 Java的基本结构就是顺序结构 2 循环结构 在顺序结构的基础下 重复执行相同或者相似的代码 for while do while 3分支结构 有条件的去执行某个语句 条件满足就执行下面的语句 条件不满足
  • SQL注入攻击流程

    1 判断SQL注入点 本质原理是 找一个需要后台处理后提交给数据库的点 所有的输入只要和数据库进行交互的 都有可能触发SQL注入 一般为三大类 Get参数触发SQL注入 POST参数触发SQL注入 Cookie触发SQL注入 而验证是否存在
  • 华为手机打开图片很慢是怎么回事_华为手机相册打开很慢怎么解决?

    造成卡顿的原因 相册里存储信息较多 由于手机读取相册中的信息需要一定时间 可能出现卡顿现象 系统卡顿通用解决办法 请保持手机电量高于 20 手机低电量时为了延长待机时间 保护手机 会对手机的性能进行限制 卸载第三方手机管家类软件 如果您的手
  • 【Python】首届一年一度秀代码时间罒ω罒

    声明 以下代码大家如果有兴趣的话可以用LDLE代码编辑器运行看看 NO 1 万能计算器 难度系数 1 算术运算符 a input 请输入第一个数字 b input 请输入第二个数字 a float a b float b print 和 a
  • 小韭菜

    大家好 我是章鱼猫 今天给大家推荐的这个项目是 leeks 原名小韭菜 后改名为 leeks 这是一个 IDEA 查看股票 基金插件 写代码的同时还能瞄一眼股票 基金 真的是工作 搞基两不误 安装 下载当前最新的安装包 leeks 1 3
  • 解决 linux在 VMware中的问题 汇总 (***)

    目录 解决Ubuntu在VMware中不能全屏的问题 无需安装 VMware tools 解决虚拟机与宿主机的文件共享问题 Ubuntu Window下 X2Go 安装 连接 同步 上传文件夹 复制 粘贴 桌面共享 Linux挂载共享文件夹
  • 命令行中Gradle创建项目的打包和运行,新手起步

    第一步 下载 下载 https gradle org 官网 gt install gt releases page gt binary only 下载 下载页 https gradle org releases close notifica
  • vue中在字符串中添加点击事件

    如果你在用vue写项目中遇到了需要在字符串中写点击事件的奇葩写法 你会不会感到很头疼 我不知道你会不会 反正我肯定会 没办法谁叫咋遇到了呢 话不多说 直接上代码 html div class ml 12 mr 12 mt 8 div 采用的
  • 华为OD机试 - 可以组成网络的服务器(Java)

    题目描述 在一个机房中 服务器的位置标识在 n m 的整数矩阵网格中 1 表示单元格上有服务器 0 表示没有 如果两台服务器位于同一行或者同一列中紧邻的位置 则认为它们之间可以组成一个局域网 请你统计机房中最大的局域网包含的服务器个数 输入
  • Docker-compose安装及使用教程

    docker compose安装 方法一 首先执行pip V确认是否已安装pip 若提示 未找到命令 则根据以下步骤执行 若显示pip版本则直接执行步骤2安装即可 1 安装pip wget https bootstrap pypa io g
  • SpringBoot 中定时执行注解(@Scheduled、@EnableScheduling)

    项目开发中经常需要执行一些定时任务 比如需要在每天凌晨时候 分析一次前一天的日志信息 Spring为我们提供了异步执行任务调度的方式 提供TaskExecutor TaskScheduler 接口 SpringBoot中使用两个注解 Ena
  • C++中关于隐藏的理解

    引言 在使用中弄清楚隐藏的区别之后 还需要明白怎么使用 下面说以下隐藏 重写 重载的区别 与重载的区别 在父类与子类中 函数名相同 参数不同 无论父类中的同名函数是否含有virtual关键字 都是隐藏 与重写的区别 在父类和子类中 函数名相
  • MySQL引起索引失效的原因

    原创92 4 发布于2018 11 30 19 35 07 阅读数 451 收藏 展开 查看索引结构 mysql gt show index from staffs Table Non unique Key name Seq in inde