摘要:
1. yum install pg_repack10 -y 2. yum install pg_qualstats10 阅读全文
摘要:
1.过滤出执行时间极大SQL语句(maatkit的digest工具,按照执行时间排序) mysqlbinlog binlog.xxxxxxx |mk-query-digest –type binlog –nofor-explain在测试机上执行筛选的语句,并没有发现有任何的性能异常 https:// 阅读全文
摘要:
1. pt-ioprofile功能:方便定位IO问题,可通过IO吞吐量来定位。 原理:pt-ioprofile的原理是对某个pid附加一个strace进程进行IO分析。 2. [root@node3 bin]# ./pt-ioprofile 通过这个报告我们可以看到,哪个文件占用IO的时间比较多,跟 阅读全文
摘要:
1. 完全备份 创建用于备份恢复的用户 pxb 并赋予权限 mysql> create user pxb@'localhost' identified by '123456'; mysql> grant reload,process,lock tables,replication client on 阅读全文
摘要:
1.技术点 完成业务功能,要懂基本的Sql语句。 做性能优化,要懂索引,懂引擎。 做分库分表,要懂主从,懂读写分离。 做安全,要懂权限,懂备份,懂日志。 做云数据库,要懂源码,懂瓶颈。 https://zhuanlan.zhihu.com/p/352066490 2.进行性能分析。对于 MySQL 阅读全文
摘要:
1. 得到具体的时间段 133.228.58.10 12/Mar/2021:17:37:46 +0800] 1011022 1253594651655540736] "POST /api/teapi/queue/impexp/expStatus HTTP/1.1" 0.072 406 200 "ht 阅读全文
摘要:
1. 利用max(case when then) 聚合函数,max,取最大值 (case when course = '语文' then score else 0 end) 判断 as 语文 别名作为列名 2.max(when course='语文' then score else 0 end) m 阅读全文
摘要:
1. Inspectors 查看数据内容 Inspectors是用于查看会话的内容,上半部分是请求的内容,下半部分是响应的内容: 参考:https://cloud.tencent.com/developer/article/1614445 阅读全文
摘要:
1. 脚本 # vim /root/pgback.sh !#/bin/bash cd / back=/home/backup send=`date '+%Y-%m-%d'` pg_dump --dbname="postgresql://127.0.0.1:5432/tenant_1008412?us 阅读全文
摘要:
1.登陆 psql -h 127.0.0.1 -U postgres -p31800 postgres (1)列出所有的数据库 mysql: show databasespsql: \l或\list (2)切换数据库 mysql: use dbnamepsql: \c dbname (3)列出当前数 阅读全文