2007-06-07 17:56:25 +08:00
$PostgreSQL: pgsql/contrib/pgstattuple/README.pgstattuple.euc_jp,v 1.9 2007/06/07 09:56:25 mha Exp $
2001-10-01 09:52:38 +08:00
2002-08-23 16:19:49 +08:00
pgstattuple README 2002/08/22 <20> а <EFBFBD> ã<EFBFBD> <C3A3>
2001-10-01 09:52:38 +08:00
2006-09-04 11:49:05 +08:00
1. <20> <> <EFBFBD> ݡ<EFBFBD> <DDA1> Ȥ<EFBFBD> <C8A4> <EFBFBD> <EFBFBD> Ƥ<EFBFBD> <C6A4> <EFBFBD> <EFBFBD> ؿ<EFBFBD>
2001-10-01 09:52:38 +08:00
2006-09-04 11:49:05 +08:00
pgstattuple
-----------
2006-07-06 10:18:07 +08:00
pgstattuple<6C> ϡ<EFBFBD> UPDATE<54> <45> DELETE<54> Ǻ<EFBFBD> <C7BA> <EFBFBD> <EFBFBD> 줿<EFBFBD> <ECA4BF> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Υ <EFBFBD> <CEA5> <EFBFBD> <EFBFBD> ΰ<EFBFBD> <CEB0> <EFBFBD> <EFBFBD> 礭<EFBFBD> <E7A4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
<20> <> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Τ <EFBFBD> ʪ<EFBFBD> <CAAA> Ū<EFBFBD> <C5AA> <EFBFBD> 礭<EFBFBD> <E7A4AD> <EFBFBD> <EFBFBD> <EFBFBD> Ф<EFBFBD> <D0A4> <EFBFBD> <EFBFBD> ѡ <EFBFBD> <D1A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ơ<EFBFBD> <C6A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֵѤ<D6B5> <D1A4> ޤ<EFBFBD> <DEA4> <EFBFBD> <EFBFBD> <EFBFBD>
2001-10-01 09:52:38 +08:00
<20> ޤꡤ<DEA4> ֵ<EFBFBD> <D6B5> ͤ<EFBFBD> <CDA4> 礭<EFBFBD> <E7A4AD> <EFBFBD> <EFBFBD> <EFBFBD> С <EFBFBD> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ߤ<EFBFBD> ¿<EFBFBD> <C2BF> <EFBFBD> Τ ǡ<CEA4> vacuum<75> <EFBFBD> <F2A4ABA4> <EFBFBD> ɬ
2002-08-23 16:19:49 +08:00
<20> פ<EFBFBD> <D7A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȥ<EFBFBD> <C8A4> <EFBFBD> Ƚ<EFBFBD> Ǥν <C7A4> <CEBD> <EFBFBD> <EFBFBD> ˤʤ<CBA4> <CAA4> 櫓<EFBFBD> Ǥ<EFBFBD> <C7A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʳ<EFBFBD> <CAB3> ˤ⤤<CBA4> <E2A4A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʾ <EFBFBD> <CABE> <EFBFBD>
<20> <> <EFBFBD> ֤<EFBFBD> <D6A4> ޤ<EFBFBD> <DEA4> <EFBFBD>
2006-09-04 11:49:05 +08:00
pgstattuple() <20> ϡ<EFBFBD> <CFA1> <EFBFBD> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ĺ<EFBFBD> <C4B9> <EFBFBD> 䡢<EFBFBD> <E4A1A2> <EFBFBD> ץ<EFBFBD> <D7A5> <EFBFBD> "<22> <> <EFBFBD> <EFBFBD> <EFBFBD> ΰ<EFBFBD> "<22> γ <EFBFBD> <CEB3> <EFBFBD> <EFBFBD> ʤɤ<CAA4>
<20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֵѤ<D6B5> <D1A4> ޤ<EFBFBD> <DEA4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ξ<EFBFBD> <CEBE> <EFBFBD> <EFBFBD> ϡ<EFBFBD> vacuum <20> <> ɬ<EFBFBD> פ<EFBFBD> <D7A4> ɤ<EFBFBD> <C9A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 桼<EFBFBD> <E6A1BC> <EFBFBD> <EFBFBD> Ƚ<EFBFBD> <C8BD>
<20> <> <EFBFBD> <EFBFBD> <EFBFBD> Τ <EFBFBD> <CEA4> <EFBFBD> Ω<EFBFBD> ĤǤ<C4A4> <C7A4> 礦<EFBFBD> <E7A4A6> <EFBFBD> 㤨<EFBFBD> а ʲ<D0B0> <CAB2> Τ 褦<CEA4> ʷ<EFBFBD> <CAB7> ˤʤ<CBA4> <CAA4> ޤ<EFBFBD> <DEA4> <EFBFBD>
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
<20> ʲ<EFBFBD> <CAB2> <EFBFBD> <EFBFBD> ƹ<EFBFBD> <C6B9> ܤ<EFBFBD> <DCA4> <EFBFBD> <EFBFBD> ƤǤ<C6A4> <C7A4> <EFBFBD>
table_len -- <20> <> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʪ<EFBFBD> <CAAA> Ū<EFBFBD> <C5AA> <EFBFBD> 礭<EFBFBD> <E7A4AD> (<28> Х <EFBFBD> <D0A5> <EFBFBD> )
tuple_count -- <20> <> <EFBFBD> ץ<EFBFBD> <D7A5> <EFBFBD>
tuple_len -- <20> <> <EFBFBD> ץ<EFBFBD> Ĺ<EFBFBD> ι <EFBFBD> <CEB9> <EFBFBD> (<28> Х <EFBFBD> <D0A5> <EFBFBD> )
tuple_percent -- <20> <> <EFBFBD> ץ<EFBFBD> <D7A5> γ <EFBFBD> <CEB3> 硥table_len<65> <6E> <EFBFBD> Ф<EFBFBD> <D0A4> <EFBFBD> tuple_len<65> <6E> <EFBFBD> <EFBFBD> Ψ<EFBFBD> <CEA8>
dead_tuple_len -- <20> ǥåɥ<C3A5> <C9A5> ץ<EFBFBD> <D7A5> <EFBFBD>
dead_tuple_percent -- <20> ǥåɥ<C3A5> <C9A5> ץ<EFBFBD> <D7A5> γ <EFBFBD> <CEB3> 硥table_len<65> <6E> <EFBFBD> Ф<EFBFBD> <D0A4> <EFBFBD> tuple_len<65> <6E> <EFBFBD> <EFBFBD> Ψ<EFBFBD> <CEA8>
free_space -- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ѳ<EFBFBD> ǽ<EFBFBD> <C7BD> <EFBFBD> ΰ<EFBFBD> (<28> Х <EFBFBD> <D0A5> <EFBFBD> )
free_percent -- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ѳ<EFBFBD> ǽ<EFBFBD> <C7BD> <EFBFBD> ΰ补table_len<65> <6E> <EFBFBD> Ф<EFBFBD> <D0A4> <EFBFBD> free_space<63> <65> <EFBFBD> <EFBFBD> Ψ<EFBFBD> <CEA8>
pg_relpages
-----------
pg_relpages() <20> ϥ<EFBFBD> <CFA5> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Υ ڡ<CEA5> <DAA1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֵѤ<D6B5> <D1A4> ޤ<EFBFBD> <DEA4> <EFBFBD>
pgstatindex
-----------
pgstatindex() <20> ϥ<EFBFBD> <CFA5> <EFBFBD> <EFBFBD> ǥå<C7A5> <C3A5> <EFBFBD> <EFBFBD> ˴ ؤ<CBB4> <D8A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֵѤ<D6B5> <D1A4> ޤ<EFBFBD> <DEA4> <EFBFBD>
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
2001-10-01 09:52:38 +08:00
2. pgstattuple<6C> Υ <EFBFBD> <CEA5> ȡ<F3A5B9A5> <C8A1> <EFBFBD>
PostgreSQL<51> <4C> /usr/local/pgsql<71> ˥<EFBFBD> <CBA5> ȡ<F3A5B9A5> <C8A1> <EFBFBD> <EFBFBD> ѤǤ<D1A4> <C7A4> ꡤtest<73> ǡ<EFBFBD> <C7A1> <EFBFBD> <EFBFBD> ١ <EFBFBD>
<20> <> <EFBFBD> <EFBFBD> pgstattuple<6C> ȡ<F3A5B9A5> <C8A1> 뤹<EFBFBD> <EBA4B9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> μ<EFBFBD> <CEBC> <EFBFBD> <EFBFBD> <EFBFBD> <F2BCA8A4> ޤ<EFBFBD> <DEA4> <EFBFBD>
$ make
$ make install
<20> 桼<EFBFBD> <E6A1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ؿ<EFBFBD> <D8BF> <EFBFBD> <EFBFBD> <EFBFBD> Ͽ<EFBFBD> <CFBF> <EFBFBD> ޤ<EFBFBD> <DEA4> <EFBFBD>
$ psql -e -f /usr/local/pgsql/share/contrib/pgstattuple.sql test
3. pgstattuple<6C> λȤ<CEBB> <C8A4> <EFBFBD>
pgstattuple<6C> θƤӽФ<D3BD> <D0A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϰʲ<CFB0> <CAB2> Ǥ<EFBFBD> <C7A4> <EFBFBD>
2002-09-04 10:54:59 +08:00
CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS pgstattuple_type
2002-08-23 16:19:49 +08:00
AS 'MODULE_PATHNAME', 'pgstattuple'
2006-02-28 00:09:50 +08:00
LANGUAGE C STRICT;
2001-10-01 09:52:38 +08:00
2006-07-06 10:18:07 +08:00
<20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : <20> <> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ̾
2001-10-01 09:52:38 +08:00
2002-09-04 10:54:59 +08:00
<20> ؿ<EFBFBD> <D8BF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> pgstattuple_type<70> <65> <EFBFBD> Ǥ<EFBFBD> <C7A4> <EFBFBD>
2001-10-01 09:52:38 +08:00
2006-07-06 10:18:07 +08:00
pgstattuple<6C> ϥ<EFBFBD> <CFA5> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> AccessShareLock<63> <6B> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʤ<EFBFBD> <CAA4> Τ ǡ<CEA4>
pgstattuple <20> <> <EFBFBD> ¹<EFBFBD> <C2B9> <EFBFBD> <EFBFBD> ˳<EFBFBD> <CBB3> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 졼<EFBFBD> <ECA1BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˹<EFBFBD> <CBB9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ȯ<EFBFBD> <C8AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ȡ<EFBFBD> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2001-12-20 09:56:08 +08:00
<20> ʤ<EFBFBD> <CAA4> <EFBFBD> <EFBFBD> ̤<EFBFBD> <CCA4> ֤<EFBFBD> <D6A4> <EFBFBD> ǽ<EFBFBD> <C7BD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ޤ<EFBFBD> <DEA4> <EFBFBD>
pgstattuple<6C> <65> <EFBFBD> <EFBFBD> <EFBFBD> ץ<EFBFBD> <D7A5> <EFBFBD> <EFBFBD> ֥<EFBFBD> <D6A5> ߡפ<DFA1> Ƚ<EFBFBD> Ǥ<EFBFBD> <C7A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϡ<EFBFBD>
HeapTupleSatisfiesNow()<29> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֤<EFBFBD> <D6A4> <EFBFBD> <EFBFBD> Ȥ<EFBFBD> <C8A4> Ǥ<EFBFBD> <C7A4> <EFBFBD>
2001-10-01 09:52:38 +08:00
4. pgstattuple<6C> Υ 饤<CEA5> <E9A5A4> <EFBFBD> <EFBFBD> <F3A5B9BE> <EFBFBD> <EFBFBD> ˤĤ<CBA4> <C4A4> <EFBFBD>
pgstattuple.c<> <63> <EFBFBD> <EFBFBD> Ƭ<EFBFBD> ˽Ƥ<F1A4A4A4> <C6A4> <EFBFBD> <EFBFBD> ̤<EFBFBD> <CCA4> Ǥ<EFBFBD> <C7A4> <EFBFBD> <EFBFBD> ޤ<EFBFBD> <DEA4> <EFBFBD> pgstattuple <20> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD> ̵<EFBFBD> <CCB5>
<20> ڤǤ<DAA4> <C7A4> <EFBFBD> pgstattuple <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ѥ<EFBFBD> <D1A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȥˤ<C8A4> <CBA4> ä<EFBFBD> <C3A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 뤤<EFBFBD> <EBA4A4> <EFBFBD> ʤ<EFBFBD> <CAA4> <EFBFBD> <EFBFBD> ̤˴ ؤ<CBB4> <D8A4> <EFBFBD>
<20> <> <EFBFBD> <EFBFBD> Ǥ<EFBFBD> <C7A4> <EFBFBD> 餤<EFBFBD> ޤ<EFBFBD> <DEA4> <EFBFBD> <EFBFBD> <EFBFBD>
5. <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2006-07-06 10:18:07 +08:00
2006/06/28
<09> <> <EFBFBD> <EFBFBD> <EFBFBD> ǥå<C7A5> <C3A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ф<EFBFBD> <D0A4> Ƥ<EFBFBD> ư<EFBFBD> <EFBFBD> <EEA4B9> <EFBFBD> 褦<EFBFBD> ˳<EFBFBD> ĥ<EFBFBD> <C4A5>
2002-09-04 10:54:59 +08:00
2002/09/04
SRF<52> ѹ<EFBFBD> <D1B9> <EFBFBD> ȼ<EFBFBD> <C8BC> <EFBFBD> <EFBFBD> Tom Lane <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <F3A5BFA1> ե<EFBFBD> <D5A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ν <EFBFBD> <CEBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ԥä<D4A4> <C3A4> <EFBFBD>
<09> <> <EFBFBD> Τ <EFBFBD> <CEA4> Ȥ<C8A4> README<4D> ˤ<EFBFBD> ȿ<EFBFBD> ǡ<EFBFBD>
2002-08-23 16:19:49 +08:00
2002/08/23
SRF(Set Returning Function)<29> <> <EFBFBD> Ȥä<C8A4> 7.3<EFBFBD> Ѥ˽<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2001-12-20 09:56:08 +08:00
2001/12/20 Tom Lane<6E> ˤ<EFBFBD> <CBA4> 뽤<EFBFBD> <EBBDA4>
Fix pgstattuple to acquire a read lock on the target table. This
prevents embarassments such as having the table dropped or truncated
partway through the scan. Also, fix free space calculation to include
pages that currently contain no tuples.
2001-10-01 09:52:38 +08:00
2001/10/01 PostgreSQL 7.2 <20> <> contrib module<6C> <65> <EFBFBD> <EFBFBD> Ͽ
2001-12-20 09:56:08 +08:00
2001-10-01 09:52:38 +08:00
2001/08/30 pgstattuple <20> С <EFBFBD> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 0.1<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>