09 2020 档案

Mysql---索引命中
摘要:1、假设 test_demo表中有个 复合索引 idx(sex,company,job) 1.1、最左前缀原则 explain select * from test_demo where sex='' and job ='' and company='' 结果:type:ref、key:idx ex 阅读全文

posted @ 2020-09-30 16:14 anpeiyong 阅读(344) 评论(0) 推荐(0) 编辑

SQL---Miscellaneous Functions
摘要:1、DEFAULT 返回指定字段的默认值 DEFAULT(col_name) 2、UUID Returns a Universal Unique Identifier (UUID) generated according to RFC 4122 阅读全文

posted @ 2020-09-30 14:52 anpeiyong 阅读(109) 评论(0) 推荐(0) 编辑

SQL---json函数
摘要:查看某个key是否存在 JSON_CONTAINS_PATH(json_doc, one_or_all, path1, path2, ...) json_doc:要检查的JSON文档。 one_or_all:指定是至少一个路径存在('one')还是所有路径都必须存在('all')。 path1, p 阅读全文

posted @ 2020-09-30 14:45 anpeiyong 阅读(180) 评论(0) 推荐(0) 编辑

SQL---Information Functions(信息函数)
摘要:1、CONNECTION_ID() 返回当前连接的线程id 2、DATABASE() 返回当前使用的数据库名称 3、LAST_INSERT_ID() 最后一次新增列的值 阅读全文

posted @ 2020-09-30 14:41 anpeiyong 阅读(170) 评论(0) 推荐(0) 编辑

SQL---Flow Control Functions(控制流函数)
摘要:1、case CASE value WHEN compare_value THEN result [WHEN compare_value THEN result ...] [ELSE result] END 2、if IF(表达式,expr2,expr3) 表达式为true,返回expr2; 表达式 阅读全文

posted @ 2020-09-30 14:21 anpeiyong 阅读(222) 评论(0) 推荐(0) 编辑

SQL---Type Conversion in Expression Evaluation(类型转换)
摘要:1、mysql自动转换类型 1.1、string -> number select 1+'1' 结果:2 1.2、number -> string SELECT CONCAT(2,' test'); 结果:2 test 2、cast() CAST(expr AS type) 3、convert 不同 阅读全文

posted @ 2020-09-30 14:11 anpeiyong 阅读(192) 评论(0) 推荐(0) 编辑

Mysql---存储过程
摘要:-- 创建循环存储过程 create procedure pro12() begin declare i int; set i = 0; while i<20000 do insert into test_demo (name, job) values ('jack5', 'job'); set i 阅读全文

posted @ 2020-09-30 10:19 anpeiyong 阅读(163) 评论(0) 推荐(0) 编辑

Mysql---MysqlServer信息
摘要:1、锁信息 show status like '%lock%'; show status like 'innodb_row_lock%'; show OPEN TABLES where In_use > 0; show status like 'table%'; 阅读全文

posted @ 2020-09-30 08:53 anpeiyong 阅读(96) 评论(0) 推荐(0) 编辑

Mysql---MySQL sys Schema
摘要:1、概述 1.1、MySQL 5.7.7及更高版本包括sys schema,这是一组 帮助DBA和开发人员解释Performance schema收集的数据的对象。 用途:sys schema对象可用于典型的调优和诊断用例。 此schema中的对象包括: 将Performance Schema数据汇 阅读全文

posted @ 2020-09-29 10:50 anpeiyong 阅读(153) 评论(0) 推荐(0) 编辑

Mysql---MySQL Performance Schema
摘要:1、概述 1.1、The MySQL Performance Schema is a feature for monitoring MySQL Server execution at a low level. MySQL 5.5开始新增一个数据库:PERFORMANCE_SCHEMA,主要用于收集数 阅读全文

posted @ 2020-09-29 10:49 anpeiyong 阅读(99) 评论(0) 推荐(0) 编辑

Mysql---information_schema
摘要:1、概述 1.1、INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data 阅读全文

posted @ 2020-09-27 14:42 anpeiyong 阅读(117) 评论(0) 推荐(0) 编辑

Mysql---The InnoDB Storage Engine
该文被密码保护。

posted @ 2020-09-11 17:33 anpeiyong 阅读(31) 评论(0) 推荐(0) 编辑

Mysql服务器信息
摘要:https://blog.csdn.net/hanyetuya/article/details/51423649 1、MySQL服务器配置信息 show variables; 2、MySQL服务器运行的各种状态值 show global status; 3、慢查询 show variables li 阅读全文

posted @ 2020-09-10 15:04 anpeiyong 阅读(113) 评论(0) 推荐(0) 编辑

索引---拓展
摘要:中文文档:http://www.deituicms.com/mysql8cn/cn/innodb-storage-engine.html#innodb-indexes 英文文档:https://dev.mysql.com/doc/refman/5.7/en/innodb-next-key-locki 阅读全文

posted @ 2020-09-01 09:30 anpeiyong 阅读(108) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 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 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示