pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Database size
4+ messages / 4 participants
[nested] [flat]

* Database size
@ 2007-06-08 08:22  choksi <choksi.dhaval@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: choksi @ 2007-06-08 08:22 UTC (permalink / raw)
  To: pgsql-performance

Hi all,

I had a database which uses to hold some 50 Mill records and disk
space used was 103 GB. I deleted around 34 Mill records but still the
disk size is same. Can some on please shed some light on this.

Thank in advance for all the help.

Dhawal Choksi




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database size
@ 2007-06-15 04:58  A. Kretschmer <andreas.kretschmer@schollglas.com>
  parent: choksi <choksi.dhaval@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: A. Kretschmer @ 2007-06-15 04:58 UTC (permalink / raw)
  To: pgsql-performance

am  Fri, dem 08.06.2007, um  1:22:14 -0700 mailte choksi folgendes:
> Hi all,
> 
> I had a database which uses to hold some 50 Mill records and disk
> space used was 103 GB. I deleted around 34 Mill records but still the
> disk size is same. Can some on please shed some light on this.

DELETE only mark rows as deleted, if you need the space you need a
VACUUM FULL.

Read more: http://www.postgresql.org/docs/current/static/sql-vacuum.html


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database size
@ 2007-06-15 17:15  Francisco Reyes <lists@stringsutils.com>
  parent: choksi <choksi.dhaval@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Francisco Reyes @ 2007-06-15 17:15 UTC (permalink / raw)
  To: choksi <choksi.dhaval@gmail.com>; +Cc: pgsql-performance

choksi writes:

> I had a database which uses to hold some 50 Mill records and disk
> space used was 103 GB. I deleted around 34 Mill records but still the
> disk size is same. Can some on please shed some light on this.

When records are deleted they are only marked in the database.
When you run vacuum in the database that space will be marked so new data 
can use the space.

To lower the space used you need to run "vacuum full".
That however can take a while and I think it will lock the database for 
some operations. 



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database size
@ 2007-06-18 08:39  J6M <j6m@adm.estp.fr>
  parent: Francisco Reyes <lists@stringsutils.com>
  0 siblings, 0 replies; 4+ messages in thread

From: J6M @ 2007-06-18 08:39 UTC (permalink / raw)
  To: Francisco Reyes <lists@stringsutils.com>; choksi <choksi.dhaval@gmail.com>; +Cc: pgsql-performance

Hello group,

Moreover a reindex (REINDEX <name of your database> while in pgsql) followed 
by an ANALYZE will claim more space.

Regards
J6M
----- Original Message ----- 
From: "Francisco Reyes" <lists@stringsutils.com>
To: "choksi" <choksi.dhaval@gmail.com>
Cc: <pgsql-performance@postgresql.org>
Sent: Friday, June 15, 2007 7:15 PM
Subject: Re: [PERFORM] Database size


> choksi writes:
>
>> I had a database which uses to hold some 50 Mill records and disk
>> space used was 103 GB. I deleted around 34 Mill records but still the
>> disk size is same. Can some on please shed some light on this.
>
> When records are deleted they are only marked in the database.
> When you run vacuum in the database that space will be marked so new data 
> can use the space.
>
> To lower the space used you need to run "vacuum full".
> That however can take a while and I think it will lock the database for 
> some operations.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-06-18 08:39 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 08:22 Database size choksi <choksi.dhaval@gmail.com>
2007-06-15 04:58 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2007-06-15 17:15 ` Francisco Reyes <lists@stringsutils.com>
2007-06-18 08:39   ` J6M <j6m@adm.estp.fr>

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