[pgsql-jp: 34261] pgstattupleの出力結果について
    和泉由美子
    izumi-yumiko @ tokyo.scnet.co.jp
       
    2004年 11月 10日 (水) 15:37:53 JST
    
    
  
和泉と申します。業務でPostgreSQLを使わせて頂いています。
PostgreSQL7.3.4でpgstattupleを使用して、データベースの使用量、空き、
不要領域を取得しようとしています。
table_len		-- physical table length in bytes
tuple_count		-- number of live tuples
tuple_len		-- total tuples length in bytes
tuple_percent		-- live tuples in %
dead_tuple_len		-- total dead tuples length in bytes
dead_tuple_percent	-- dead tuples in %
free_space		-- free space in bytes
free_percent		-- free space in %
READMEにある上記説明をよみ、
table_len=テーブルサイズ
tuple_len=テーブル使用量
dead_tuple_len=テーブルの不要領域量
free_space=テーブルの空き容量
として計算させています。
しかし、以下出力例にもあるように、tuple_len+dead_tuple_len+free_space
の結果がtable_lenと一致せず、%の合計も100になりません。
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
このような結果になるのは仕様でしょうか?
それとも、取得結果の扱い方が間違っているのでしょうか?
間違っている場合、正しい扱い方を教えて下さい。
以上よろしくお願いします。
 *********************************************************
   Yumiko Izumi
     E-mail:izumi-yumiko @ tokyo.scnet.co.jp 
 *********************************************************
    
    
pgsql-jp メーリングリストの案内