随笔分类 - 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
阅读全文
摘要:1.场景: 今天在用MySQL建表的时候,报了一个错误; SQL 错误 [1118] [42000]: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. Th
阅读全文
摘要:select COLUMN_NAME,COLUMN_TYPE from information_schema.columns where table_name ='t_advice_core' order by `ORDINAL_POSITION` SHOW VARIABLES LIKE 'char
阅读全文
摘要: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
阅读全文
摘要:https://www.cnblogs.com/zhanmeiliang/p/5911558.html https://blog.csdn.net/weixin_34381666/article/details/86339817 mysqldump --single-transaction --fl
阅读全文
摘要:存储引擎:Innodb MySQL主从是基于binlog日志,所以在安装好数据库后就要开启binlog。这样好处是,一方面可以用binlog恢复数据库,另一方面可以为主从做准备。 原有主库配置参数如下: # vi my.cnf server-id = 1 #id要唯一 log-bin = mysql
阅读全文