Determine dead tuples size
Determine dead tuples size
От:
Alexey Romanchuk <aromanchuk@swsoft.com>
Дата:
Hello guys, is it possible to determine dead tuples size for table? -- Alexey Romanchuk
Re: Determine dead tuples size
От:
"Daniel Cristian Cruz" <danielcristian@gmail.com>
Дата:
Try the contrib module pgstattuple. 2007/3/15, Alexey Romanchuk : > Hello guys, > > is it possible to determine dead tuples size for table? > > -- > Alexey Romanchuk > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Daniel Cristian Cruz Analista de Sistemas
Re: Determine dead tuples size
От:
Michael Fuhr <mike@fuhr.org>
Дата:
On Thu, Mar 15, 2007 at 01:58:47PM +0600, Alexey Romanchuk wrote: > is it possible to determine dead tuples size for table? See contrib/pgstattuple. -- Michael Fuhr
Re: Determine dead tuples size
От:
Alexey Romanchuk <aromanchuk@swsoft.com>
Дата:
Hello, Michael.
> On Thu, Mar 15, 2007 at 01:58:47PM +0600, Alexey Romanchuk wrote:
>> is it possible to determine dead tuples size for table?
> See contrib/pgstattuple.
thanks, i install contribs and try to analyze result of pgstattuple
function and found it strange.
Here it is output:
pgstattuple
----------------------------------------------------------------------
(233242624,1186804,206555428,88.56,20707,3380295,1.45,13896816,5.96)
When i try to sum all size (live, dead and free) the sum is not equal
total size. For this table 206555428 + 3380295 + 13896816 = 223832539.
The difference between total and sum is 9410085. It is near 5%.
Is it ok?
--
Alexey Romanchuk
Re: Determine dead tuples size
От:
Heikki Linnakangas <heikki@enterprisedb.com>
Дата:
Alexey Romanchuk wrote:
> thanks, i install contribs and try to analyze result of pgstattuple
> function and found it strange.
Try "SELECT * FROM pgstattuple('foo')", that'll tell you what the
columns are. Take a look at README.pgstattuple as well for more details.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Re: Determine dead tuples size
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alexey Romanchuk writes: > When i try to sum all size (live, dead and free) the sum is not equal > total size. For this table 206555428 + 3380295 + 13896816 = 223832539. > The difference between total and sum is 9410085. It is near 5%. pgstattuple is a bit simplistic: it doesn't count the page headers or item pointers at all. It looks to me like it also fails to consider the effects of alignment padding --- if a tuple's length is shown as 63, that's what it counts, even though the effective length is 64. (This might not be a problem in practice --- I'm not sure if the stored t_len has always been maxaligned or not.) regards, tom lane