MySQL-DBA--20220530 索引
摘要:1、B+ TREE 2、页:默认16KB 3、数据文件 都是16的倍数。 4、
阅读全文
MySQL-DBA--20220530 存储过程、函数、事件
摘要:1、存储过程--概述 2、存储过程--流控制语言 3、存储过程--示例与调用 4、自定义函数 5、触发器 6、触发器 7、触发器--例子 8、触发器总结 9、触发器高级使用--物化视图 10、触发器高级应用--物化视图--2 11、事件event (类似 定时器) 12、事件event--举例(ya
阅读全文
The Secret Garden --2 Mary in Yorkshire
摘要:2 Mary in Yorkshire They arrived at a very large old house. It looked dark and unfriendly from the outside. Inside, Mary looked around the big shadowy
阅读全文
MySQL-DBA--20220529 Prepare SQL语法、DML
摘要:1、第一个语句,可以用group_concat改造 继续改造:(这个salaries表,只扫描了一次) 继续改造: 2、Prepare SQL语法 优势: 开销最小 防止sql注入 动态拼接 3、语法举例: 动态查询: 上面语句的改进: 4、DML语法--insert insert语句 on dup
阅读全文
The Secret Garden --1 Little Miss Mary
摘要:1 Little Miss Mary Nobody seemed to care about Mary. She was born in India, where her father was a British official. He was busy with his work, and he
阅读全文
MySQL-DBA--20220527 SQL JION语句
摘要:1、SQL JOIN 语法(内连接) 内连接举例(下面的两个sql语句是完全相同的) select * from x,y where x.a = y.a select * from x join y on x.a = y.a 2、引入 ANSI SQL92,是为了 解决 外连接。 3、体会与下面语句
阅读全文
MySQL-DBA--20220526 IN 和 EXISTS语句
摘要:1、理解一下:IN 和 EXISTS 2、这个IN语句,怎么换成EXISTS 第一个语句(IN):独立子查询,速度快。 第二个语句(EXISTS):相关子查询,速度慢。 3、IN的结果 4、NOT IN的结果 5、NOT IN 和 IN 的结果(含NULL) 继续一个例子: 要先把NULL值过滤掉,
阅读全文
The Love of a King -- 12 Long Live Love!
摘要:12 Long Live Love! In 1970, two years before his death, Edward said: There are some people who think that I was wrong to give away my crown. But they
阅读全文
MySQL-DBA--20220526 GROUP BY语句
摘要:1、guroup by 2、group by 两个字段(dbt3) 3、参数tmp_table_size,可以优化 group by 语句 4、参数tmp_table_size,默认16M 5、可以查看 created_temp_tables和created_tmp_disk_tables,来确定是
阅读全文
The Love of a King -- 11 Paris
摘要:11 Paris For the next thirty years the Duke and Duchess lived in Paris. They gave parties and travelled round the world, but they never went back to B
阅读全文
MySQL-DBA--20220525 子查询
摘要:1、关于 order by 这里牵涉到一个参数:sort_buffer_size,默认256KB。 可以更改这个参数,变成256MB show status like 'sort%' 注意这个状态:sort_merge_passes show global status like 'sort%' o
阅读全文
The Love of a King -- 10 The Wedding
摘要:10 The Wedding The next morning Edward telephoned Wallis from Boulogne. 'Did you listen to me on the radio?' he asked. 'Yes, of course,' she said. 'An
阅读全文
MySQL-DBA--20220524
摘要:1、分区表 2、分区类型 3、分区表--举例 4、关于--PARTITIONS表 5、主键 6、第一范式、第二范式、第三范式 7、show table status
阅读全文
The Love of a King -- 9 The Woman I Love
摘要:9 The Woman I Love A few days later Mr Churchill came to sec Edward at Buckingham Palace. At first the King was quiet.Then he said: 'This is my last n
阅读全文
MySQL-DBA--20220523 数据类型(续)
摘要:13、字符串类型--ENUM&SET 14、日期类型 15、几个时间函数 (root@192.168.142.130)[mysql]> select now(); (root@192.168.142.130)[mysql]> select unix_timestamp(now()); (root@1
阅读全文
The Love of a King -- 8 The Storm
摘要:8 The Storm In July and August Wallis and the King sailed the Mediterranean. They met Prime Minister Metaxas in Greece, Kemal Ataturk in Turkey, and K
阅读全文
MySQL-DBA--20220522 数据类型
摘要:1、INT类型 2、INT类型--属性 3、AUTO_CREMENT 自增列,建议用bigint,不要用int。 (root@192.168.142.130)[test]> select * from z; 先插入了1,2,3,4,5条数据,然后删除了4,5。 (root@192.168.142.1
阅读全文
The Love of a King -- 7 The Church
摘要:7 The Church In the spring of 1936, Mrs Simpson wrote a Letter to her husband. ' Dear Ernest,' she wrote. ' Yor have been very kind to me. You are a g
阅读全文
程序员的数学-20220520 欧式距离、曼哈顿距离、海明距离、角度度量的总结
摘要:1、欧式距离、曼哈顿距离、海明距离、角度度量的总结
阅读全文
程序员的数学-20220520 角度距离
摘要:1、欧氏距离、曼哈顿距离、海明距离的取值范围 2、角度度量对长度不敏感,主要是度量方向 3、角度距离--举例 4、角度距离--举例(续) 5、 总结: 角度度量的距离,更多的是衡量在各个维度上的比例差异,而和绝对数值关系不大。 arccos:相似度 6、arccos 的求法 7、n维角度度量的计算公
阅读全文
程序员的数学-20220520 海明距离
摘要:1、海明距离 两个码字的对应比特取值不同的比特数称为这两个码字的海明距离。 一个有效编码集中,任意两个码字的海明距离的最小值称为该编码集的海明距离。 本质是异或 相等:0 不相等:1 2、欧氏距离、曼哈顿距离、海明距离--用来度量长度上的差异
阅读全文
程序员的数学-20220520 曼哈顿距离
摘要:1、曼哈顿距离 2、曼哈顿距离--例子 3、曼哈顿距离的特例
阅读全文
程序员的数学-20220520 欧式距离
摘要:1、欧式距离计算公式 2、修正的欧氏距离 3、有权重的欧氏距离 4、修正权重的方法 5、带有权重的欧式距离公式 6、欧氏距离的局限
阅读全文
The Love of a King -- 6 The king is Dead! Long Live the King!
摘要:6 The king is Dead! Long Live the King! In January 1936 Edward went to Windsor for a few weeks. He was tired of town life and he wanted to work in his
阅读全文
MySQL-DBA--20220520 存储引擎
摘要:1、Mysql存储引擎--MyISAM 2、Mysql存储引擎--Memory 3、Mysql存储引擎--物理特性 4、Mysql存储引擎--CSV 5、Mysql存储引擎--Federated
阅读全文
MySQL-DBA--20220520 慢查询日志、通用日志
摘要:1、慢查询日志 mysql5.7,将时区信息写入到慢查询日志。可能是个坑。 最好这样设置:log_timestamps = system 2、慢查询日志-相关参数 (root@192.168.142.130)[(none)]> show variables like '%slow_query%';
阅读全文
The Love of a King -- 5 Wallis
摘要:5 Wallis This is how Lady Furness described Mrs Simpson's early life to Edward: Wallis was born in Baltimore. She never knew her father. He died when
阅读全文
MySQL-DBA--20220519
摘要:1、忘记密码后,怎么进入mysql [root@node-mysql80 bin]# mysql 这样进不去mysql [mysqld] skip-grant-tables 在my.cnf中加入上面的语句 [root@node-mysql80 bin]# /etc/init.d/mysql.serv
阅读全文
MySQL-DBA--20220518
摘要:1、启动及关闭mysql systemctl restart mysql.server /etc/init.d/mysql.server restart systemctl start mysql.server systemctl stop mysql.server /etc/init.d/mysq
阅读全文
The Love of a King -- 4 The Meeting
摘要:4 The Meeting In the autumn of 1930 Edward went to stay with his friend Lord and Lady Furness. This is how he described that weekend in a book called
阅读全文
The Love of a King -- The Duke and Duchess of Windsor 2
摘要:IN APRIL 1987, THREE HUNDRED PEOPLE CAME TO A SMALL room in Geneva, Switzerland. There were Presidents and Kings, film stars and millionaires. They ca
阅读全文
The Love of a King -- 1 A Lonely Child
摘要:1 A Lonely Child Prince Edward was born in 1894. His father, King Geoge V, was a tall, cold man who did not like children. ' Why does Edward talk all
阅读全文
The Love of a King -- The Duke and Duchess of Windsor
摘要:The Duke and Duchess of Windsor 1894 Edward is born in Richmond, England. 1896 Wallis is born in Baltimore, USA. 1911 Edward becomes Prince of Wales.
阅读全文
MySQL-DBA--20220517
摘要:1、配置文件 mysql --help --verbose | grep my.cnf 2、系统变量 show variables like 'long%query%'; show global variables like 'long%query%'; show variables like 'l
阅读全文