Skip site navigation (1) Skip section navigation (2)

Re: REINDEX not working for wastedspace

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: REINDEX not working for wastedspace
Date: 2011-09-21 07:06:59
Message-ID: 1316588819.2001.0.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, 2011-09-21 at 13:01 +0600, AI Rumman wrote:
> I am using Postgresql 9.0.1.
> 
> Using the query http://wiki.postgresql.org/wiki/Show_database_bloat, I got
> the following result for a table:
> 
> -[ RECORD 1 ]----+-----------------------------------------------
> current_database | crm
> schemaname       | public
> tablename        | _attachments
> tbloat           | 0.9
> wastedbytes      | 0
> iname            | attachments_description_type_attachmentsid_idx
> ibloat           | 2.3
> wastedibytes     | 5439488
> -[ RECORD 2 ]----+-----------------------------------------------
> current_database | crm
> schemaname       | public
> tablename        | _attachments
> tbloat           | 0.9
> wastedbytes      | 0
> iname            | attachments_attachmentsid_idx
> ibloat           | 0.2
> wastedibytes     | 0
> -[ RECORD 3 ]----+-----------------------------------------------
> current_database | crm
> schemaname       | public
> tablename        | _attachments
> tbloat           | 0.9
> wastedbytes      | 0
> iname            | _attachments_pkey
> ibloat           | 0.2
> wastedibytes     | 0
> 
> I REINDEXED  both the indexes and table, but I did not find any change in
> wastedspace or wastedispace.
> Could you please tell me why?

REINDEX only rebuilds indexes. And you'll obviously have a bit of "lost
space" because of the FILLFACTOR value (90% on indexes IIRC).


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


In response to

Responses

pgsql-performance by date

Next:From: Venkat BalajiDate: 2011-09-21 07:07:46
Subject: Re: REINDEX not working for wastedspace
Previous:From: AI RummanDate: 2011-09-21 07:01:01
Subject: REINDEX not working for wastedspace

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group