细节
-
错误
-
状态: Done">完成
-
高
-
解决方法: 固定
-
Pg_sm - 1.1.0
-
没有一个
-
是的
-
是的
-
团队冲刺4
-
是的
-
是的
描述
在主分支上,创建和插入语句正在为以下场景进行规范化。这需要解决,使回归干净的PG-13的主要分支,我可以继续创建一个PR。
国防部:所有查询都应该为下面给出的配置进行规范化
/ / postgresql.confshared_preload_libraries =“pg_stat_raybet雷竞技竞猜在线官网monitor”pg_stat_raybet雷竞技竞猜在线官网monitor。pgsm_normalized_query =“是的”
(电子邮件保护)~/pg_stat_mraybet雷竞技竞猜在线官网onitor_naeem$ sudo systemctl restart .输出说明(电子邮件保护)(电子邮件保护):~/pg_stat_raybet雷竞技竞猜在线官网monitor_naeem$ pgbench -i -s 10 drop old tables…创建表……生成数据(客户端)…1000000元组中的1000000(100%)已完成(经过0.80秒,剩余0.00秒)创建主键…耗时1.35秒(删除表0.02秒,创建表0.00秒,客户端生成表0.83秒,抽真空0.21秒,主键0.29秒)。(电子邮件保护)~/pg_stat_mraybet雷竞技竞猜在线官网onitor_naeem$ pgbench -c 10 -j 2 -t 1000 starting vacuum…end.输出说明事务类型:<内置:TPC-B (sort of)>比例因子:10查询模式:简单客户端数量:10线程数量:2每个客户端事务数量:1000实际处理的事务数量:10000/10000延迟平均= 3.803 ms tps = 2629.322318(含连接建立)tps = 2632.029226(不含连接建立)(电子邮件保护):~/pg_stat_raybet雷竞技竞猜在线官网monitor_naeem$ psql psql (13.7 (Ubuntu 13.7-1.pgdg20.04+1)“帮助”为的帮助。Postgres =# select * from pg_statraybet雷竞技竞猜在线官网_monitor_settings;名称|值| default_value | | |最小需求描述最大| |选项重新启动 ------------------------------------------+--------+---------------+----------------------------------------------------------------------------------------------------------+---------+------------+----------------+--------- pg_stat_monitor。raybet雷竞技竞猜在线官网pgsm_max | 100 | 100 |设置使用的共享内存的最大大小(MB)为由pg_stat_monitor跟踪的语句元数据。raybet雷竞技竞猜在线官网| 1 | 1000 | | yes pg_stat_raybet雷竞技竞猜在线官网monitor. | 1 | 1000 | | yes。pgsm_query_max_len | 2048 | 2048 |设置查询的最大长度。| 1024 | 2147483647 | | yes pg_stat_raybet雷竞技竞猜在线官网monitor。pgsm_track_utility | yes | yes |选择是否跟踪实用命令。| | | yes, no | no pg_stat_raybet雷竞技竞猜在线官网monitor。pgsm_normalized_query | yes | no |选择是否以规范化格式保存查询。| | | yes, no | no pg_stat_raybet雷竞技竞猜在线官网monitor。pgsm_max_buckets | 10 | 10 |设置最大桶数。| 1 | 10 | | yes pg_stat_raybet雷竞技竞猜在线官网monitor. | 1 | 10 | | yes。pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used为由pg_stat_monitor跟踪的查询。raybet雷竞技竞猜在线官网| 1 | 10000 | | yes pg_stat_raybet雷竞技竞猜在线官网monitor. | 1 | 10000 | | yes。pgsm_overflow_target | 1 | 1 |设置溢出目标为Pg_stat_raybet雷竞技竞猜在线官网monitor | 0 | 1 | | yes Pg_stat_monitor。pgsm_enable_query_plan | no | no |开启/关闭查询计划监控| | | yes, no | raybet雷竞技竞猜在线官网no pg_stat_monitor. | no | no |开启/关闭查询计划监控| | | yes, no | no pg_stat_monitor. | no | no |pgsm_track | top | top |选择由pg_stat_monitor跟踪的语句。raybet雷竞技竞猜在线官网| | | none, top, all | no pg_stat_raybet雷竞技竞猜在线官网monitor. bb0 | | none, top, all | no。pgsm_extract_comments | no | no |启用/禁用从查询中提取注释。| | | yes, no | no pg_stat_raybet雷竞技竞猜在线官网monitor。pgsm_track_planning | no | no |选择是否跟踪规划统计。| | | yes, no | no (15 rows) postgres=# select datname, substr(query,0,150) as query, calls from pg_stat_raybet雷竞技竞猜在线官网monitor order by datname, query, calls desc Limit 20;datname | |查询电话 ----------+---------------------------------------------------------------------------------------------------------------+------- postgres | | 10000年开始postgres | | 10000年结束postgres |插入pgbench_history (tid,报价,援助,三角洲,mtime)值(51岁,5,503360,4449,CURRENT_TIMESTAMP) | 10000 postgres |选择从pgbench_accounts abalance援助= 10000美元| postgres |选择pg_stat_monitor_reset postgres() | raybet雷竞技竞猜在线官网1 |更新pgbench_accounts组abalance = abalance + 1美元援助= 10000美元| postgres |更新pgbench_branches组bbalance = bbalance + 1美元报价= 10000美元| postgres |更新pgbench_tellers组tbalance tid = = tbalance + 1美元10000美元| postgres | alter table pgbench_accounts添加主键(援助)| 1 postgres | alter tablePgbench_branches add primary key (bid) | 1 postgres | alter table pgbench_tellers add primary key (tid) | 1 postgres | begin | 1 postgres | commit | 1 postgres | copy pgbench_accounts from stdin | 1 postgres | create table pgbench_accounts(aid .int不零,报价int, abalanceint,填料字符(84))用(fillfactor=100) | 1 postgres |创建表pgbench_branches(bid .int不零, bbalanceint,填料字符(88)) and (fillfactor=100) | 1 postgres |创建表pgbench_history(tid .int,报价int,援助intδintmtime时间戳,填料字符(22)) | 1 postgres |创建表pgbench_tellers(tid .int不零,报价int, tbalanceint,填料字符(84)) with (fillfactor=100) | 1 postgres | drop table如果存在pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1 postgres | insert into pgbench_branches(bid,bbalance) values(1,0) | 10 (20 rows) postgres=# select pg_stat_monitraybet雷竞技竞猜在线官网or_version();pg_stat_raybet雷竞技竞猜在线官网monitor_version ------------------------- 1.1.0-dev(1行)postgres = #
附件
问题的链接
- 中提到的
-
页面加载……