pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedDetermine dead tuples size
6+ messages / 5 participants
[nested] [flat]
* Determine dead tuples size
@ 2007-03-15 07:58 Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-15 11:43 ` Re: Determine dead tuples size Daniel Cristian Cruz <danielcristian@gmail.com>
2007-03-15 11:45 ` Re: Determine dead tuples size Michael Fuhr <mike@fuhr.org>
0 siblings, 2 replies; 6+ messages in thread
From: Alexey Romanchuk @ 2007-03-15 07:58 UTC (permalink / raw)
To: pgsql-performance
Hello guys,
is it possible to determine dead tuples size for table?
--
Alexey Romanchuk
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Determine dead tuples size
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
@ 2007-03-15 11:43 ` Daniel Cristian Cruz <danielcristian@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Cristian Cruz @ 2007-03-15 11:43 UTC (permalink / raw)
To: ; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Determine dead tuples size
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
@ 2007-03-15 11:45 ` Michael Fuhr <mike@fuhr.org>
2007-03-16 05:41 ` Re: Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
1 sibling, 1 reply; 6+ messages in thread
From: Michael Fuhr @ 2007-03-15 11:45 UTC (permalink / raw)
To: Alexey Romanchuk <aromanchuk@swsoft.com>; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Determine dead tuples size
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-15 11:45 ` Re: Determine dead tuples size Michael Fuhr <mike@fuhr.org>
@ 2007-03-16 05:41 ` Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-16 09:35 ` Re: Determine dead tuples size Heikki Linnakangas <heikki@enterprisedb.com>
2007-03-16 14:29 ` Re: Determine dead tuples size Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 6+ messages in thread
From: Alexey Romanchuk @ 2007-03-16 05:41 UTC (permalink / raw)
To: pgsql-performance
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Determine dead tuples size
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-15 11:45 ` Re: Determine dead tuples size Michael Fuhr <mike@fuhr.org>
2007-03-16 05:41 ` Re: Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
@ 2007-03-16 09:35 ` Heikki Linnakangas <heikki@enterprisedb.com>
1 sibling, 0 replies; 6+ messages in thread
From: Heikki Linnakangas @ 2007-03-16 09:35 UTC (permalink / raw)
To: aromanchuk@swsoft.com; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Determine dead tuples size
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-15 11:45 ` Re: Determine dead tuples size Michael Fuhr <mike@fuhr.org>
2007-03-16 05:41 ` Re: Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
@ 2007-03-16 14:29 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 6+ messages in thread
From: Tom Lane @ 2007-03-16 14:29 UTC (permalink / raw)
To: aromanchuk@swsoft.com; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2007-03-16 14:29 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 07:58 Determine dead tuples size Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-15 11:43 ` Daniel Cristian Cruz <danielcristian@gmail.com>
2007-03-15 11:45 ` Michael Fuhr <mike@fuhr.org>
2007-03-16 05:41 ` Alexey Romanchuk <aromanchuk@swsoft.com>
2007-03-16 09:35 ` Heikki Linnakangas <heikki@enterprisedb.com>
2007-03-16 14:29 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox