Unix Technical Forum

Determine dead tuples size

This is a discussion on Determine dead tuples size within the Pgsql Performance forums, part of the PostgreSQL category; --> Hello guys, is it possible to determine dead tuples size for table? -- Alexey Romanchuk ---------------------------(end of broadcast)--------------------------- TIP ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 10:23 AM
Alexey Romanchuk
 
Posts: n/a
Default Determine dead tuples size

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:23 AM
Daniel Cristian Cruz
 
Posts: n/a
Default Re: Determine dead tuples size

Try the contrib module pgstattuple.

2007/3/15, Alexey Romanchuk <aromanchuk@swsoft.com>:
> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:23 AM
Michael Fuhr
 
Posts: n/a
Default Re: Determine dead tuples size

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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 10:23 AM
Alexey Romanchuk
 
Posts: n/a
Default Re: Determine dead tuples size

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



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 10:23 AM
Heikki Linnakangas
 
Posts: n/a
Default Re: Determine dead tuples size

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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 10:23 AM
Tom Lane
 
Posts: n/a
Default Re: Determine dead tuples size

Alexey Romanchuk <aromanchuk@swsoft.com> 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

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com