Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
blob: 33fd9ee7edcb92a39c4480755b76dff0e1c88a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
$Id: README.pgstattuple.euc_jp,v 1.4 2002/09/04 02:54:59 ishii Exp $

pgstattuple README		2002/08/22 �а�ã��

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����Ψ��

2. pgstattuple�Υ��󥹥ȡ���

   PostgreSQL��/usr/local/pgsql�˥��󥹥ȡ����ѤǤ��ꡤtest�ǡ����١�
   ����pgstattuple�򥤥󥹥ȡ��뤹�������μ����򼨤��ޤ���

    $ make
    $ make install

    �桼�������ؿ�����Ͽ���ޤ���

    $ psql -e -f /usr/local/pgsql/share/contrib/pgstattuple.sql test


3. pgstattuple�λȤ���

   pgstattuple�θƤӽФ������ϰʲ��Ǥ���

   CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS pgstattuple_type
     AS 'MODULE_PATHNAME', 'pgstattuple'
     LANGUAGE 'c' WITH (isstrict);

   ��������: �ơ��֥�̾

   �ؿ���������pgstattuple_type���Ǥ���

   pgstattuple�ϥơ��֥���AccessShareLock���������ʤ��Τǡ�
   pgstattuple ���¹����˳����ơ��֥��˹�����������ȯ�������ȡ�������
   �ʤ����̤��֤���ǽ���������ޤ���

   pgstattuple�����ץ����֥��ߡפ�Ƚ�Ǥ��������ϡ�
   HeapTupleSatisfiesNow()�������֤����Ȥ��Ǥ���

4. pgstattuple�Υ饤���󥹾����ˤĤ���

   pgstattuple.c����Ƭ�˽񤤤Ƥ����̤��Ǥ����ޤ���pgstattuple �ϴ�����̵��
   �ڤǤ���pgstattuple �����Ѥ������Ȥˤ��ä������뤤���ʤ����̤˴ؤ���
   ����Ǥ���餤�ޤ�����

5. ��������

   2002/09/04

	SRF�ѹ���ȼ����Tom Lane	���������󥿡��ե������ν������Ԥä���
	���Τ��Ȥ򤳤�README�ˤ�ȿ�ǡ�

   2002/08/23

	SRF(Set Returning Function)���Ȥä�7.3�Ѥ˽񤭴�����

   2001/12/20 Tom Lane�ˤ��뽤��

   	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 PostgreSQL 7.2 ��contrib module����Ͽ

   2001/08/30 pgstattuple �С������� 0.1���꡼��