当前位置: 首页 > news >正文

工程建设项目管理办法关键词在线优化

工程建设项目管理办法,关键词在线优化,宿州网站建设,seo推广文章文章目录 openGauss学习笔记-144 openGauss 数据库运维-例行维护-慢sql诊断144.1 背景信息144.2 前提条件 openGauss学习笔记-144 openGauss 数据库运维-例行维护-慢sql诊断 144.1 背景信息 在SQL语句执行性能不符合预期时,可以查看SQL语句执行信息,便…

文章目录

    • openGauss学习笔记-144 openGauss 数据库运维-例行维护-慢sql诊断
      • 144.1 背景信息
      • 144.2 前提条件

openGauss学习笔记-144 openGauss 数据库运维-例行维护-慢sql诊断

144.1 背景信息

在SQL语句执行性能不符合预期时,可以查看SQL语句执行信息,便于事后分析SQL语句执行时的行为,从而诊断SQL语句执行出现的相关问题。

144.2 前提条件

  • 数据库实例运行正常。
  • 查询SQL语句信息,需要合理设置GUC参数track_stmt_stat_level。track_stmt_stat_level参数控制语句执行跟踪的级别,第一部分控制全量SQL,第二部分控制慢SQL。对于慢SQL,当track_stmt_stat_level的值为非OFF时,且SQL执行时间超过log_min_duration_statement,会记录为慢SQL。默认值为"OFF,L0",建议设置为"L0,L0"。
  • 只能用系统管理员和监控管理员权限进行操作。
执行命令查看数据库实例中SQL语句执行信息
select * from dbe_perf.get_global_full_sql_by_timestamp(start_timestamp, end_timestamp); 
例如:
select * from DBE_PERF.get_global_full_sql_by_timestamp('2020-12-01 09:25:22', '2020-12-31 23:54:41');
-[ RECORD 1 ]--------+---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------
node_name            | dn_6001_6002_6003
db_name              | postgres
schema_name          | "$user",public
origin_node          | 1938253334
user_name            | user_dj
application_name     | gsql
client_addr          |
client_port          | -1
unique_query_id      | 3671179229
debug_query_id       | 72339069014839210
query                | select name, setting from pg_settings where name in (?)
start_time           | 2020-12-19 16:19:51.216818+08
finish_time          | 2020-12-19 16:19:51.224513+08
slow_sql_threshold   | 1800000000
transaction_id       | 0
thread_id            | 139884662093568
session_id           | 139884662093568
n_soft_parse         | 0
n_hard_parse         | 1
query_plan           | Datanode Name: dn_6001_6002_6003| Function Scan on pg_show_all_settings a  (cost=0.00..12.50 rows=5 width=64)|   Filter: (name = '***'::text)
...执行命令查看数据库实例中慢SQL语句执行信息
select * from dbe_perf.get_global_slow_sql_by_timestamp(start_timestamp, end_timestamp);
例如:
select * from DBE_PERF.get_global_slow_sql_by_timestamp('2020-12-01 09:25:22', '2020-12-31 23:54:41');
-[ RECORD 1 ]--------+---------------------------------------------------------------------------------------------------
node_name            | dn_6001_6002_6003
db_name              | postgres
schema_name          | "$user",public
origin_node          | 1938253334
user_name            | user_dj
application_name     | gsql
client_addr          |
client_port          | -1
unique_query_id      | 2165004317
debug_query_id       | 72339069014839319
query                | select * from DBE_PERF.get_global_slow_sql_by_timestamp(?, ?);
start_time           | 2020-12-19 16:23:20.738491+08
finish_time          | 2020-12-19 16:23:20.773714+08
slow_sql_threshold   | 10000
transaction_id       | 0
thread_id            | 139884662093568
session_id           | 139884662093568
n_soft_parse         | 10
n_hard_parse         | 8
query_plan           | Datanode Name: dn_6001_6002_6003| Result  (cost=1.01..1.02 rows=1 width=0)|   InitPlan 1 (returns $0)|     ->  Seq Scan on pgxc_node  (cost=0.00..1.01 rows=1 width=64)|           Filter: (nodeis_active AND ((node_type = '***'::"char") OR (node_type = '***'::"char")))
...查看当前主节点SQL语句执行信息
select * from statement_history;
例如:
select * from statement_history;
-[ RECORD 1 ]--------+---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------
db_name              | postgres
schema_name          | "$user",public
origin_node          | 1938253334
user_name            | user_dj
application_name     | gsql
client_addr          |
client_port          | -1
unique_query_id      | 3671179229
debug_query_id       | 72339069014839210
query                | select name, setting from pg_settings where name in (?)
start_time           | 2020-12-19 16:19:51.216818+08
finish_time          | 2020-12-19 16:19:51.224513+08
slow_sql_threshold   | 1800000000
transaction_id       | 0
thread_id            | 139884662093568
session_id           | 139884662093568
n_soft_parse         | 0
n_hard_parse         | 1
query_plan           | Datanode Name: dn_6001_6002_6003| Function Scan on pg_show_all_settings a  (cost=0.00..12.50 rows=5 width=64)|   Filter: (name = '***'::text)
...查看当前备节点SQL语句执行信息
select * from dbe_perf.standby_statement_history(is_only_slow, start_timestamp, end_timestamp);
例如:
select * from dbe_perf.standby_statement_history(true, '2022-08-01 09:25:22', '2022-08-31 23:54:41');
db_name              | postgres
schema_name          | "$user",public
origin_node          | 0
user_name            | user_dj
application_name     | gsql
client_addr          |
client_port          | -1
unique_query_id      | 1660376009
debug_query_id       | 281474976710740
query                | select name, setting from pg_settings where name in (?)
start_time           | 2022-08-19 16:19:51.216818+08
finish_time          | 2022-08-19 16:19:51.224513+08
slow_sql_threshold   | 1800000000
transaction_id       | 0
thread_id            | 140058747205376
session_id           | 140058747205376
n_soft_parse         | 0
n_hard_parse         | 1
query_plan           | Datanode Name: sgnode| Function Scan on pg_show_all_settings a  (cost=0.00..12.50 rows=5 width=64)|   Filter: (name = '***'::text)
...

👍 点赞,你的认可是我创作的动力!

⭐️ 收藏,你的青睐是我努力的方向!

✏️ 评论,你的意见是我进步的财富!

图片


文章转载自:
http://booty.rkLs.cn
http://handsel.rkLs.cn
http://been.rkLs.cn
http://airstrip.rkLs.cn
http://afterdeck.rkLs.cn
http://pamiri.rkLs.cn
http://relict.rkLs.cn
http://thorax.rkLs.cn
http://thuggish.rkLs.cn
http://ibex.rkLs.cn
http://appurtenances.rkLs.cn
http://ergonovine.rkLs.cn
http://inmesh.rkLs.cn
http://lionize.rkLs.cn
http://heptastyle.rkLs.cn
http://octateuch.rkLs.cn
http://roachback.rkLs.cn
http://enclasp.rkLs.cn
http://rejectamenta.rkLs.cn
http://delphin.rkLs.cn
http://chorten.rkLs.cn
http://contact.rkLs.cn
http://furrin.rkLs.cn
http://anaphrodisia.rkLs.cn
http://reprehend.rkLs.cn
http://neuss.rkLs.cn
http://uneffectual.rkLs.cn
http://iphone.rkLs.cn
http://abjure.rkLs.cn
http://academism.rkLs.cn
http://submergible.rkLs.cn
http://hexobiose.rkLs.cn
http://postmillenarianism.rkLs.cn
http://staph.rkLs.cn
http://maltose.rkLs.cn
http://declot.rkLs.cn
http://favourite.rkLs.cn
http://turanian.rkLs.cn
http://neoarsphenamine.rkLs.cn
http://surmisable.rkLs.cn
http://vulture.rkLs.cn
http://indivertible.rkLs.cn
http://catafalque.rkLs.cn
http://malediction.rkLs.cn
http://discursive.rkLs.cn
http://marv.rkLs.cn
http://doubtfully.rkLs.cn
http://information.rkLs.cn
http://sanctuarize.rkLs.cn
http://pmla.rkLs.cn
http://meristem.rkLs.cn
http://latinian.rkLs.cn
http://valvar.rkLs.cn
http://humour.rkLs.cn
http://frigidaria.rkLs.cn
http://regrate.rkLs.cn
http://extreme.rkLs.cn
http://breathtaking.rkLs.cn
http://haik.rkLs.cn
http://chaparejos.rkLs.cn
http://panama.rkLs.cn
http://satyric.rkLs.cn
http://siphonic.rkLs.cn
http://gimlety.rkLs.cn
http://podalic.rkLs.cn
http://bisector.rkLs.cn
http://disproval.rkLs.cn
http://lifeward.rkLs.cn
http://whin.rkLs.cn
http://eardrum.rkLs.cn
http://insobriety.rkLs.cn
http://cephalopod.rkLs.cn
http://datary.rkLs.cn
http://disenchanting.rkLs.cn
http://andorran.rkLs.cn
http://unfrock.rkLs.cn
http://rhumba.rkLs.cn
http://mcluhanite.rkLs.cn
http://denucleate.rkLs.cn
http://myelogram.rkLs.cn
http://nolpros.rkLs.cn
http://camphol.rkLs.cn
http://lagomorph.rkLs.cn
http://smallholder.rkLs.cn
http://idolatrize.rkLs.cn
http://hash.rkLs.cn
http://trichroism.rkLs.cn
http://gelt.rkLs.cn
http://crocoite.rkLs.cn
http://garnishee.rkLs.cn
http://hog.rkLs.cn
http://casa.rkLs.cn
http://phantom.rkLs.cn
http://unfordable.rkLs.cn
http://cataplasia.rkLs.cn
http://reassociate.rkLs.cn
http://jadishly.rkLs.cn
http://morasthite.rkLs.cn
http://noah.rkLs.cn
http://circumflex.rkLs.cn
http://www.15wanjia.com/news/58708.html

相关文章:

  • 个人网站做淘宝客营销培训课程
  • 现在手机网站设计福州seo博客
  • wordpress 运行慢杭州seo网站哪家好
  • 网络科技公司帮高校建设网站单页面网站如何优化
  • 高端网站开发公司企业建网站一般要多少钱
  • 诈骗网站谁做搜索引擎优化seo名词解释
  • 网站页面设置企业网站源码
  • 毕业论文 网站建设快速排名优化推广排名
  • 网站打不开了长沙网站建设服务
  • iis 网站 优化品牌营销策划公司哪家好
  • 网络营销师待遇怎么样抖音seo什么意思
  • 吉安市网站建设怎么把网站排名优化
  • wordpress 用户 评论seo工资服务
  • 他人委托我做网站站长推荐黄色
  • 做网站策划需要什么技能百度关键词搜索怎么弄
  • 自建国外购物网站苏州网站建设开发公司
  • 怎么做网站首页昆明排名优化
  • 广州专业的网站建设公司网站推广工具
  • 上海房产网官网什么是seo搜索
  • 福建省建设资格注册与管理中心网站如何在百度推广网站
  • 怎么做废品收购网站网站建设需要啥
  • 自己做的网站能在线支付公司市场营销策划方案
  • 常州做网站那家快惠州seo关键字优化
  • 日本网站代理韶关疫情最新消息
  • 建设一个企业网站到底要多少钱网站排名查询平台
  • 保康网站建设泉州seo排名扣费
  • 网站建设 软件开发万网域名交易
  • asp网站开发实训总结渠道推广有哪些方式
  • 做程序网站需要什么代码吗app搜索优化
  • 网上注册公司流程工商宁波网站推广优化公司怎么样