Re: File Fragmentation

From: Vick Khera <vivek(at)khera(dot)org>
To: jg <jg(at)rilk(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: File Fragmentation
Date: 2013-03-20 13:46:29
Message-ID: CALd+dcdqsndDuQ9iOBvd__2yq9u1=PZsz2PJJh4cv8MTwOPVhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 20, 2013 at 7:13 AM, jg <jg(at)rilk(dot)com> wrote:

> Now, there is a partition rotation script, that suppress old tables when
> some size limit happens.
> Let suppose, that this script runs and suppress only one table qith few
> days of data, then recreates a new empty one.
>

It sounds like you are using partitioned tables. your partitions should be
divided up such that they help optimize your queries. that is, minimize the
number of partitions you need to scan for any given query.

That said, try to make is so that this cleanup script purges whole
partitions, not just deleting some rows. That way new data will fill in
space without fragmentation.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2013-03-20 13:47:01 Re: Matching uppercased russian words (\x0410-\x042F) in UTF8 database 8.4.13
Previous Message Achilleas Mantzios 2013-03-20 13:33:41 Re: "Leaking" disk space on FreeBSD servers