pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: AI Rumman <rummandba@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: REINDEX not working for wastedspace
Date: Wed, 21 Sep 2011 09:06:59 +0200
Message-ID: <1316588819.2001.0.camel@localhost.localdomain> (raw)
In-Reply-To: <CAGoODpcBxGLyF=bY3_5opO4YckgJqFGwBxveU_cYsrXBbN4NgQ@mail.gmail.com>
References: <CAGoODpcBxGLyF=bY3_5opO4YckgJqFGwBxveU_cYsrXBbN4NgQ@mail.gmail.com>

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




view thread (11+ messages)  latest in thread

Message-ID: <1316588819.2001.0.camel@localhost.localdomain>
Permalink:  ../1316588819.2001.0.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1316588819.2001.0.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: guillaume@lelarge.info, rummandba@gmail.com
  Subject: Re: REINDEX not working for wastedspace
  In-Reply-To: <1316588819.2001.0.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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