Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: db size
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 17 Topic 3990 of 4361
Post > Topic >>

Re: db size

by dev@[EMAIL PROTECTED] (Richard Huxton) Apr 17, 2008 at 09:52 AM

Adrian Moisey wrote:
> Hi
> 
>>> INFO:  "blahxxx": scanned 27 of 27 pages, containing 1272 live rows 
>>> and 0 dead rows; 1272 rows in sample, 1272 estimated total rows
>>
>> This is a small table that takes up 27 pages and it scanned all of 
>> them. You have 1272 rows in it and none of them are dead (i.e. 
>> deleted/updated but still taking up space).
> 
> I had a look through a few other tables...:
> 
> INFO:  "table1": scanned 22988 of 22988 pages, containing 2713446 live 
> rows and 895662 dead rows; 45000 rows in sample, 2713446 estimate
> d total rows
> 
> INFO:  "table2": scanned 24600 of 24600 pages, containing 270585 live 
> rows and 65524 dead rows; 45000 rows in sample, 270585 estimated total
rows
> 
> Is that dead rows an issue?  Should I try clean it out?  Will it improve

> performance ?

What you're hoping to see is that figure remain stable. The point of the 
free-space-map is to track these and allow the space to be re-used. If 
you find that the number of dead rows is increasing then either you are:
1. Just deleting rows
2. Not vacuuming enough - check your autovacuum settings

The effect on performance is that when you read in a page from disk 
you're reading dead rows along with the data you are after. Trying to 
keep 0 dead rows in a constantly updated table isn't worth the effort 
though - you'd end up wasting your disk I/O on maintenance rather than 
queries.

The figures above look high to me - 90,000 out of 270,000 and 65,000 out 
of 270,000. Of course, if these tables have just had bulk 
updates/deletes then that's fine. If there's a steady stream of updates 
though, you probably want to up your autovacuum settings.

-- 
   Richard Huxton
   Archonet Ltd

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 17 Posts in Topic:
db size
adrian@[EMAIL PROTECTED]   2008-04-14 08:29:56 
Re: db size
VGopal@[EMAIL PROTECTED]   2008-04-13 23:55:14 
Re: db size
craig@[EMAIL PROTECTED]   2008-04-14 16:37:54 
Re: db size
lists@[EMAIL PROTECTED]   2008-04-14 11:18:19 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-14 11:21:59 
Re: db size
lists@[EMAIL PROTECTED]   2008-04-14 11:33:54 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-14 11:44:12 
Re: db size
lists@[EMAIL PROTECTED]   2008-04-14 12:01:52 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-15 09:33:06 
Re: db size
craig@[EMAIL PROTECTED]   2008-04-14 18:40:39 
Re: db size
wmoran@[EMAIL PROTECTED]   2008-04-14 09:12:12 
Re: db size
wmoran@[EMAIL PROTECTED]   2008-04-15 07:12:22 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-17 08:28:42 
Re: db size
dev@[EMAIL PROTECTED] (R  2008-04-17 09:15:04 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-17 10:37:25 
Re: db size
adrian@[EMAIL PROTECTED]   2008-04-17 10:43:47 
Re: db size
dev@[EMAIL PROTECTED] (R  2008-04-17 09:52:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 20:51:15 CDT 2008.