华为Gaussdb性能优化
1.查看当前连接或服务器的状态信息
show status like 'Com_select' //select操作次数
show status like 'Com_insert' //insert操作次数
show status like 'Com_update' //update操作次数
show status like 'Com_delete' //delete操作次数
show status like 'Com_commit' //事务提交次数
show status like 'Com_rollback' //事务回滚次数
show status like 'Connections' //连接服务器的次数
show status like 'Slow_queries' //慢查询次数
show status like 'Innodb_rows_read' //select查询返回的行数
show status like 'Innodb_rows_inserted' //执行insert插入的行数
show status like 'Innodb_rows_deleted' //执行deleted删除的行数
show status like 'Innodb_rows_updated' //执行updated更新的行数
2.慢sql日志需要等待执行语句结束才能记录,对于正在运行的sql语句,可以使用:
show processlist //查看当前数据库进行的线程
3. explain | desc sql //查看执行计划
对表的访问方式访问类型:
ALL:
index:
range:
index_rang
ref_or_null
ref:
eq_ref:
const,system:
null
polardb,gaussdb,mysql 数据库参数查询:
show global variables;
call dbms_ccl.show_ccl_rule();
华为配置参数: 阿里云配置参数:
innodb_write_io_threads 4(huawei) innodb_write_io_threads 8(aly)
innodb_read_io_threads ?(huawei) innodb_read_io_threads 8(aly)
? innodb_log_io_threads 4(aly)
parallel_max_threads 64(huawei) thread_pool_max_threads 10000(aly)
? max_connections 64512(aly)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2021-07-21 多线程,控制Task的20个并发数量,全部子线程执行完后,获取所有返回的值
2012-07-21 Objective-C 关键字 学好必知
2012-07-21 IOS NSOperation的使用方法
2012-07-21 IOS 实现本地通知(local notification)的yong法
2010-07-21 人脉关系大检阅 chuangye