Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
70bc947d
Commit
70bc947d
authored
18 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Update Japanese readme for pgstattuple.
parent
c9a64909
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/pgstattuple/README.pgstattuple.euc_jp
+103
-27
103 additions, 27 deletions
contrib/pgstattuple/README.pgstattuple.euc_jp
with
103 additions
and
27 deletions
contrib/pgstattuple/README.pgstattuple.euc_jp
+
103
−
27
View file @
70bc947d
$PostgreSQL: pgsql/contrib/pgstattuple/README.pgstattuple.euc_jp,v 1.
7
2006/0
7
/0
6
0
2:18
:0
7
momjian Exp $
$PostgreSQL: pgsql/contrib/pgstattuple/README.pgstattuple.euc_jp,v 1.
8
2006/0
9
/0
4
0
3:49
:0
5
momjian Exp $
pgstattuple README 2002/08/22 石井達夫
1.
pgstattupleとは
1.
サポートされている関数
pgstattuple
-----------
pgstattupleは,UPDATEやDELETEで作られたリレーションのゴミ領域の大きさを,
リレーション自体の物理的な大きさに対するパーセンテージで返却します.つ
まり,返却値が大きければ,それだけゴミも多いので,vacuumをかける必
要があるという判断の助けになるわけです.これ以外にもいろいろな情報
が返ります.
test=# \x
Expanded display is on.
test=# select * from pgstattuple('pg_proc');
-[ RECORD 1 ]------+-------
table_len | 458752
tuple_count | 1470
tuple_len | 438896
tuple_percent | 95.67
dead_tuple_count | 11
dead_tuple_len | 3157
dead_tuple_percent | 0.69
free_space | 8932
free_percent | 1.95
各項目の説明です.
table_len -- リレーションの物理的な大きさ(バイト)
tuple_count -- タプル数
tuple_len -- タプル長の合計(バイト)
tuple_percent -- タプルの割合.table_lenに対するtuple_lenの比率.
dead_tuple_len -- デッドタプル数
dead_tuple_percent -- デッドタプルの割合.table_lenに対するtuple_lenの比率.
free_space -- 再利用可能な領域(バイト)
free_percent -- 再利用可能な領域.table_lenに対するfree_spaceの比率.
pgstattuple() は、リレーションの長さや、タプルの"ゴミ領域"の割合などの
情報を返却します。これらの情報は、vacuum が必要かどうか、ユーザが判断
するのに役立つでしょう。例えば以下のような形になります:
test=> \x
Expanded display is on.
test=> SELECT * FROM pgstattuple('pg_catalog.pg_proc');
-[ RECORD 1 ]------+-------
table_len | 458752
tuple_count | 1470
tuple_len | 438896
tuple_percent | 95.67
dead_tuple_count | 11
dead_tuple_len | 3157
dead_tuple_percent | 0.69
free_space | 8932
free_percent | 1.95
以下が各項目の内容です:
table_len -- リレーションの物理的な大きさ(バイト)
tuple_count -- タプル数
tuple_len -- タプル長の合計(バイト)
tuple_percent -- タプルの割合.table_lenに対するtuple_lenの比率.
dead_tuple_len -- デッドタプル数
dead_tuple_percent -- デッドタプルの割合.table_lenに対するtuple_lenの比率.
free_space -- 再利用可能な領域(バイト)
free_percent -- 再利用可能な領域.table_lenに対するfree_spaceの比率.
pg_relpages
-----------
pg_relpages() はリレーションのページ数を返却します.
pgstatindex
-----------
pgstatindex() はインデックスに関する情報を返却します:
test=> \x
Expanded display is on.
test=> SELECT * FROM pgstatindex('pg_cast_oid_index');
-[ RECORD 1 ]------+------
version | 2
tree_level | 0
index_size | 8192
root_block_no | 1
internal_pages | 0
leaf_pages | 1
empty_pages | 0
deleted_pages | 0
avg_leaf_density | 50.27
leaf_fragmentation | 0
bt_metap
--------
bt_metap() はbtreeインデックスのメタページに関する情報を返却します:
test=> SELECT * FROM bt_metap('pg_cast_oid_index');
-[ RECORD 1 ]-----
magic | 340322
version | 2
root | 1
level | 0
fastroot | 1
fastlevel | 0
bt_page_stats
-------------
bt_page_stats() は、btreeの単一のページに関する情報を表示します:
test=> SELECT * FROM bt_page_stats('pg_cast_oid_index', 1);
-[ RECORD 1 ]-+-----
blkno | 1
type | l
live_items | 256
dead_items | 0
avg_item_size | 12
page_size | 8192
free_size | 4056
btpo_prev | 0
btpo_next | 0
btpo | 0
btpo_flags | 3
bt_page_items
-------------
bt_page_items() は、各btreeページの個別のアイテムに関する情報を表示します:
test=> SELECT * FROM bt_page_items('pg_cast_oid_index', 1);
itemoffset | ctid | itemlen | nulls | vars | data
------------+---------+---------+-------+------+-------------
1 | (0,1) | 12 | f | f | 23 27 00 00
2 | (0,2) | 12 | f | f | 24 27 00 00
3 | (0,3) | 12 | f | f | 25 27 00 00
4 | (0,4) | 12 | f | f | 26 27 00 00
5 | (0,5) | 12 | f | f | 27 27 00 00
6 | (0,6) | 12 | f | f | 28 27 00 00
7 | (0,7) | 12 | f | f | 29 27 00 00
8 | (0,8) | 12 | f | f | 2a 27 00 00
2. pgstattupleのインストール
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment