name | 5454638501896836859 |
---|---|
hostname | postgres.linux |
port | 5432 |
pg_version | 9.0devel |
snapshot begin | 2010-03-31 12:45:00 |
snapshot end | 2010-03-31 12:55:00 |
snapshot duration | 00:10:00 |
total database size | 9801 kB |
total commits | 571 |
total rollbacks | 3 |
ID | database | MB | +MB | commit/s | rollback/s | hit% | gets/s | reads/s | rows/s |
---|---|---|---|---|---|---|---|---|---|
1 | postgres | 9 | 4 | 0.952 | 0.005 | 99.400 | 540.826 | 3.422 | 908.826 |
2 | bench | 35 | 35 | 1012.830 | 0.005 | 99.900 | 23343.504 | 23.109 | 9182.790 |
ID | tablespace | location | device | used (MB) | avail (MB) | remain% |
---|---|---|---|---|---|---|
1 | pg_default | /home/postgres/pgdata/head | 253:0 | 9532 | 264162 | 96.517 |
2 | pg_global | /home/postgres/pgdata/head | 253:0 | 9532 | 264162 | 96.517 |
ID | database | schema | table | MB | table reads | index reads | toast reads |
---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_accounts | 13 | 7916 | 829 | 0 |
2 | bench | public | pgbench_history | 14 | 4276 | 0 | 0 |
3 | postgres | statsrepo | column | 1 | 591 | 98 | 0 |
4 | postgres | statsrepo | index | 0 | 262 | 22 | 0 |
5 | postgres | statsrepo | table | 0 | 102 | 20 | 0 |
6 | postgres | statsrepo | statement | 0 | 48 | 7 | 0 |
7 | bench | public | pgbench_tellers | 0 | 43 | 4 | 0 |
8 | bench | public | pgbench_branches | 0 | 27 | 4 | 0 |
9 | postgres | statsrepo | setting | 0 | 8 | 8 | 0 |
10 | postgres | statsrepo | function | 0 | 7 | 7 | 0 |
ID | pid | client address | when to start | duration (sec) | query |
---|
ID | database | schema | table | INSERT | UPDATE | DELETE | total | HOT% |
---|---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_accounts | 100000 | 607502 | 0 | 707502 | 99.100 |
2 | bench | public | pgbench_tellers | 10 | 607501 | 0 | 607511 | 100.000 |
3 | bench | public | pgbench_branches | 1 | 607501 | 0 | 607502 | 100.000 |
4 | bench | public | pgbench_history | 607499 | 0 | 0 | 607499 | |
5 | postgres | statsrepo | column | 10141 | 0 | 0 | 10141 | |
6 | postgres | statsrepo | index | 2014 | 0 | 0 | 2014 | |
7 | postgres | statsrepo | table | 1453 | 0 | 0 | 1453 | |
8 | postgres | pg_catalog | pg_statistic | 114 | 603 | 0 | 717 | 53.100 |
9 | postgres | pg_catalog | pg_attribute | 590 | 2 | 23 | 615 | 100.000 |
10 | postgres | pg_catalog | pg_depend | 494 | 0 | 36 | 530 | |
11 | postgres | statsrepo | statement | 259 | 0 | 0 | 259 | |
12 | postgres | pg_catalog | pg_class | 68 | 117 | 1 | 186 | 88.900 |
13 | postgres | statsrepo | setting | 144 | 0 | 0 | 144 | |
14 | bench | pg_catalog | pg_statistic | 17 | 112 | 0 | 129 | 88.400 |
15 | postgres | statsrepo | schema | 119 | 0 | 0 | 119 | |
16 | postgres | pg_catalog | pg_trigger | 100 | 0 | 0 | 100 | |
17 | postgres | statsrepo | autoanalyze | 68 | 0 | 0 | 68 | |
18 | postgres | pg_catalog | pg_type | 56 | 0 | 2 | 58 | |
19 | bench | pg_catalog | pg_attribute | 44 | 0 | 0 | 44 | |
20 | postgres | pg_toast | pg_toast_2619 | 22 | 0 | 19 | 41 |
ID | database | schema | table | seq_scan | seq_tup_read | tup_per_seq | hit% |
---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_accounts | 1 | 100000 | 100000.000 | 99.800 |
2 | postgres | statsrepo | table | 15 | 11865 | 791.000 | 99.800 |
3 | postgres | statsrepo | statement | 7 | 1314 | 187.714 | 95.400 |
4 | postgres | statsrepo | setting | 7 | 736 | 105.143 | 96.600 |
5 | postgres | statsrepo | schema | 732 | 66343 | 90.633 | 99.700 |
6 | bench | public | pgbench_tellers | 138504 | 1162700 | 8.395 | 100.000 |
7 | postgres | statsrepo | snapshot | 10 | 39 | 3.900 | 100.000 |
8 | postgres | statsrepo | database | 9 | 32 | 3.556 | 100.000 |
9 | postgres | statsrepo | instance | 5 | 3 | 0.600 | 97.400 |
10 | bench | public | pgbench_branches | 1181485 | 607504 | 0.514 | 100.000 |
ID | database | schema | table | rows | dead rows | pages | rows per page |
---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_history | 291559 | 0 | 1536 | 189.817 |
2 | bench | public | pgbench_accounts | 100001 | 7727 | 1744 | 57.340 |
ID | database | schema | table | column | correlation |
---|
total checkpoints | 12 |
---|---|
checkpoints by time | 0 |
checkpoints by xlog | 10 |
avg written buffers | 2124.167 |
max written buffers | 2739.000 |
avg duration (sec) | 11.565 |
max duration (sec) | 14.709 |
ID | database | schema | table | count | avg index scans | avg removed rows | avg remain rows | avg duration (sec) | max duration (sec) |
---|---|---|---|---|---|---|---|---|---|
1 | postgres | pg_catalog | pg_statistic | 1 | 1.000 | 23.000 | 448.000 | 0.040 | 0.040 |
2 | bench | public | pgbench_tellers | 8 | 0.750 | 296.375 | 15.250 | 0.005 | 0.020 |
3 | bench | public | pgbench_branches | 8 | 0.750 | 73.750 | 7.875 | 0.002 | 0.020 |
ID | funcid | name | name | funcname | calls | total time (ms) | self time (ms) | time/call (ms) |
---|---|---|---|---|---|---|---|---|
1 | 16660 | postgres | statsrepo | div | 872 | 7 | 7 | 0.008 |
2 | 16396 | postgres | public | pg_stat_statements | 9 | 2 | 2 | 0.222 |
3 | 16385 | postgres | statsinfo | sample | 106 | 1 | 1 | 0.009 |
4 | 16389 | postgres | statsinfo | tablespaces | 9 | 0 | 0 | 0.000 |
5 | 16386 | postgres | statsinfo | activity | 9 | 0 | 0 | 0.000 |
ID | user | database | query | calls | total time (sec) | time/call (sec) |
---|---|---|---|---|---|---|
1 | postgres | bench | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2; | 607630 | 543.502 | 0.001 |
2 | postgres | bench | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2; | 607631 | 137.384 | 0.000 |
3 | postgres | bench | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2; | 607633 | 30.323 | 0.000 |
4 | postgres | bench | SELECT abalance FROM pgbench_accounts WHERE aid = $1; | 607631 | 10.180 | 0.000 |
5 | postgres | bench | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP); | 607627 | 7.097 | 0.000 |
6 | postgres | postgres | CREATE DATABASE bench; | 1 | 0.647 | 0.647 |
7 | postgres | bench | END; | 607627 | 0.367 | 0.000 |
8 | postgres | bench | BEGIN; | 607634 | 0.346 | 0.000 |
9 | postgres | bench | copy pgbench_accounts from stdin | 1 | 0.334 | 0.334 |
10 | postgres | postgres | SELECT i.oid AS indexrelid, c.oid AS relid, i.reltablespace, i.relname AS indexrelname, i.relam, i.relpages, i.reltuples, i.reloptions, x.indisunique, x.indisprimary, x.indisclustered, x.indisvalid, x.indkey, pg_get_indexdef(i.oid), pg_relation_size(i.oid), pg_stat_get_numscans(i.oid) AS idx_scan, pg_stat_get_tuples_returned(i.oid) AS idx_tup_read, pg_stat_get_tuples_fetched(i.oid) AS idx_tup_fetch, pg_stat_get_blocks_fetched(i.oid) - pg_stat_get_blocks_hit(i.oid) AS idx_blks_read, pg_stat_get_blocks_hit(i.oid) AS idx_blks_hit FROM pg_class c JOIN pg_index x ON c.oid = x.indrelid JOIN pg_class i ON i.oid = x.indexrelid WHERE c.relkind IN ('r', 't') | 9 | 0.166 | 0.018 |
11 | postgres | postgres | INSERT INTO statsrepo.column VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) | 10141 | 0.147 | 0.000 |
12 | postgres | postgres | /* * bin/pg_statsrepo.sql * * Copyright (c) 2010, NIPPON TELEGRAPH AND TELEPHONE CORPORATION */ -- Adjust this setting to control where the objects get created. SET search_path = public; BEGIN; SET LOCAL client_min_messages = WARNING; CREATE SCHEMA statsrepo; CREATE TABLE statsrepo.instance ( instid bigserial, name text NOT NULL, hostname text NOT NULL, port integer NOT NULL, pg_version text, PRIMARY KEY (instid), UNIQUE (name, hostname, port) ); CREATE TABLE statsrepo.snapshot ( snapid bigserial, instid bigint, time timestamptz, comment text, PRIMARY KEY (snapid), FOREIGN KEY (instid) REFERENCES statsrepo.instance (instid) ON DELETE CASCADE ); CREATE TABLE statsrepo.tablespace ( snapid bigint, tbs oid, name name, location text, device text, avail bigint, total bigint, spcoptions text[], PRIMARY KEY (snapid, name), FOREIGN KEY (snapid) REFERENCES statsrepo.snapshot (snapid) ON DELETE CASCADE ); CREATE TABLE statsrepo.database ( snapid bigin | 34 | 0.125 | 0.004 |
13 | postgres | postgres | SELECT d.oid AS dbid, d.datname, pg_database_size(d.oid), age(d.datfrozenxid), pg_stat_get_db_xact_commit(d.oid) AS xact_commit, pg_stat_get_db_xact_rollback(d.oid) AS xact_rollback, pg_stat_get_db_blocks_fetched(d.oid) - pg_stat_get_db_blocks_hit(d.oid) AS blks_read, pg_stat_get_db_blocks_hit(d.oid) AS blks_hit, pg_stat_get_db_tuples_returned(d.oid) AS tup_returned, pg_stat_get_db_tuples_fetched(d.oid) AS tup_fetched, pg_stat_get_db_tuples_inserted(d.oid) AS tup_inserted, pg_stat_get_db_tuples_updated(d.oid) AS tup_updated, pg_stat_get_db_tuples_deleted(d.oid) AS tup_deleted FROM pg_database d WHERE datallowconn AND datname <> ALL (('{' || $1 || '}')::text[]) ORDER BY 1 | 9 | 0.113 | 0.013 |
14 | postgres | bench | SELECT i.oid AS indexrelid, c.oid AS relid, i.reltablespace, i.relname AS indexrelname, i.relam, i.relpages, i.reltuples, i.reloptions, x.indisunique, x.indisprimary, x.indisclustered, x.indisvalid, x.indkey, pg_get_indexdef(i.oid), pg_relation_size(i.oid), pg_stat_get_numscans(i.oid) AS idx_scan, pg_stat_get_tuples_returned(i.oid) AS idx_tup_read, pg_stat_get_tuples_fetched(i.oid) AS idx_tup_fetch, pg_stat_get_blocks_fetched(i.oid) - pg_stat_get_blocks_hit(i.oid) AS idx_blks_read, pg_stat_get_blocks_hit(i.oid) AS idx_blks_hit FROM pg_class c JOIN pg_index x ON c.oid = x.indrelid JOIN pg_class i ON i.oid = x.indexrelid WHERE c.relkind IN ('r', 't') | 8 | 0.100 | 0.012 |
15 | postgres | postgres | SELECT 1 FROM ONLY "statsrepo"."snapshot" x WHERE "snapid" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x | 14220 | 0.092 | 0.000 |
16 | postgres | bench | alter table pgbench_accounts add primary key (aid) | 1 | 0.085 | 0.085 |
17 | postgres | postgres | SELECT 1 FROM ONLY "statsrepo"."table" x WHERE "snapid" OPERATOR(pg_catalog.=) $1 AND "dbid" OPERATOR(pg_catalog.=) $2 AND "tbl" OPERATOR(pg_catalog.=) $3 FOR SHARE OF x | 12155 | 0.076 | 0.000 |
18 | postgres | postgres | SELECT 1 FROM ONLY "statsrepo"."database" x WHERE "snapid" OPERATOR(pg_catalog.=) $1 AND "dbid" OPERATOR(pg_catalog.=) $2 FOR SHARE OF x | 14023 | 0.074 | 0.000 |
19 | postgres | bench | vacuum analyze pgbench_accounts | 1 | 0.074 | 0.074 |
20 | postgres | postgres | SELECT a.attrelid, a.attnum, a.attname, format_type(atttypid, atttypmod) AS type, a.attstattarget, a.attstorage, a.attnotnull, a.attisdropped, s.stawidth as avg_width, s.stadistinct as n_distinct, CASE WHEN s.stakind1 = 3 THEN s.stanumbers1[1] WHEN s.stakind2 = 3 THEN s.stanumbers2[1] WHEN s.stakind3 = 3 THEN s.stanumbers3[1] WHEN s.stakind4 = 3 THEN s.stanumbers4[1] ELSE NULL::real END AS correlation FROM pg_attribute a LEFT JOIN pg_class c ON a.attrelid = c.oid LEFT JOIN pg_statistic s ON a.attnum = s.staattnum AND a.attrelid = s.starelid AND NOT s.stainherit WHERE a.attnum > 0 AND c.relkind IN ('r', 't') | 9 | 0.072 | 0.008 |
ID | name | setting | source |
---|---|---|---|
1 | default_text_search_config | pg_catalog.english | configuration file |
2 | lc_messages | C | configuration file |
3 | log_autovacuum_min_duration | 0 | configuration file |
4 | log_checkpoints | on | configuration file |
5 | log_destination | csvlog | override |
6 | log_timezone | Japan | command line |
7 | logging_collector | on | override |
8 | max_stack_depth | 2048 | environment variable |
9 | pg_statsinfo.snapshot_interval | 60 | configuration file |
10 | pg_statsinfo.textlog_min_messages | debug | configuration file |
11 | server_encoding | UTF8 | override |
12 | shared_buffers | 4096 | configuration file |
13 | shared_preload_libraries | pg_statsinfo, pg_stat_statements | configuration file |
14 | TimeZone | Japan | command line |
15 | timezone_abbreviations | Default | command line |
16 | track_functions | all | configuration file |
ID | database | schema | table | columns | row width | MB | +MB | table scans | index scans |
---|---|---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_accounts | 4 | 97 | 13 | 13 | 1 | 1215004 |
2 | bench | public | pgbench_branches | 3 | 8 | 0 | 0 | 1181485 | 0 |
3 | bench | public | pgbench_history | 6 | 24 | 14 | 14 | 0 | 0 |
4 | bench | public | pgbench_tellers | 4 | 12 | 0 | 0 | 138504 | 491232 |
ID | database | schema | index | table | MB | +MB | scans | rows/scan | reads | hits | keys |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | bench | public | pgbench_accounts_pkey | pgbench_accounts | 2 | 2 | 1215004 | 1.000 | 829 | 2447153 | aid |
2 | bench | public | pgbench_branches_pkey | pgbench_branches | 0 | 0 | 0 | 4 | 82 | bid | |
3 | bench | public | pgbench_tellers_pkey | pgbench_tellers | 0 | 0 | 491232 | 1.000 | 4 | 491441 | tid |