随笔分类 -  SQL / mysql

摘要:慢SQL(增删改查)记录 SELECT TOP 100 (total_elapsed_time / execution_count)/1000 N'平均时间ms' ,total_elapsed_time/1000 N'总花费时间ms' ,total_worker_time/1000 N'所用的CPU 阅读全文
posted @ 2024-04-28 09:43 zhaoguanhao 阅读(7) 评论(0) 推荐(0) 编辑
摘要:1.场景: 今天在用MySQL建表的时候,报了一个错误; SQL 错误 [1118] [42000]: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. Th 阅读全文
posted @ 2023-12-14 14:03 zhaoguanhao 阅读(2490) 评论(0) 推荐(0) 编辑
摘要:select COLUMN_NAME,COLUMN_TYPE from information_schema.columns where table_name ='t_advice_core' order by `ORDINAL_POSITION` SHOW VARIABLES LIKE 'char 阅读全文
posted @ 2023-12-14 13:58 zhaoguanhao 阅读(11) 评论(0) 推荐(0) 编辑
摘要:select 'est',count(AC_NO) as generated_ac_no from t_advice_index where BACKET_PATH = 'e-statement.20230930' union allselect 't24',count(distinct ACC_N 阅读全文
posted @ 2023-10-13 14:13 zhaoguanhao 阅读(10) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/zhanmeiliang/p/5911558.html https://blog.csdn.net/weixin_34381666/article/details/86339817 mysqldump --single-transaction --fl 阅读全文
posted @ 2021-10-29 21:27 zhaoguanhao 阅读(50) 评论(0) 推荐(0) 编辑
摘要:存储引擎:Innodb MySQL主从是基于binlog日志,所以在安装好数据库后就要开启binlog。这样好处是,一方面可以用binlog恢复数据库,另一方面可以为主从做准备。 原有主库配置参数如下: # vi my.cnf server-id = 1 #id要唯一 log-bin = mysql 阅读全文
posted @ 2021-08-25 16:05 zhaoguanhao 阅读(199) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示