pss.userid,
pss.dbid,
pd.datname as db_name,
round((pss.total_exec_time + pss.total_plan_time)::numeric, 2) as total_time,
pss.calls,
round((pss.mean_exec_time+pss.mean_plan_time)::numeric, 2) as mean,
round((100 * (pss.total_exec_time + pss.total_plan_time) / sum((pss.total_exec_time + pss.total_plan_time)::numeric) OVER ())::numeric, 2) as cpu_portion_pctg,
pss.query
FROM pg_stat_statements pss, pg_database pd
WHERE pd.oid=pss.dbid
ORDER BY (pss.total_exec_time + pss.total_plan_time)
DESC LIMIT 30;
userid | dbid | db_name | total_time | calls | mean | cpu_portion_pctg |query
10 | 16384 | rdsadmin | 421147.49 | 10800 | 39.00 | 29.70 | select sum(blks_read), sum(blks_hit) from pg_stat_database
10 | 16384 | rdsadmin | 319989.90 | 10801 | 29.63 | 22.57 | select sum(aurora_stat_get_db_commit_latency(oid)) from pg_database
10 | 16384 | rdsadmin | 225863.17 | 21601 | 10.46 | 15.93 | SELECT coalesce(sum(used_bytes),$1) FROM aurora_stat_file() WHERE filename like $2
10 | 16384 | rdsadmin | 154639.85 | 957608 | 0.16 | 10.91 | WITH upsert AS (UPDATE public.rds_heartbeat2 SET value=$1 WHERE id=$3 RETURNING *) INSERT INTO public.rds_heartbeat2 (id, value) SELECT $4, $2 WHERE NOT EXIST
S (SELECT * FROM upsert)
20515 | 14717 | postgres | 90936.75 | 1289189 | 0.07 | 6.41 | SELECT current_setting($1) AS transaction_read_only, current_setting($2) AS max_connections, EXTRACT($3 FROM now() - pg_postmaster_start_time()) AS uptime, du
rable_lsn, current_read_lsn FROM aurora_replica_status() WHERE server_id = $4 ORDER BY (session_id = $5) ASC LIMIT $6
10 | 16384 | rdsadmin | 38513.19 | 10801 | 3.57 | 2.72 | SELECT count(*) from pg_catalog.pg_proc where proname=$1 and pronamespace=$2::regnamespace::oid
сорян, цпу. А что значит раком ставило ?
На сепвере рос bloat табоиц и резко росла нагрузка от обычной работы. А что такое "убивает по ЦПУ"? Это вообще как? И зачем вы такое настроили?
Обсуждают сегодня