Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.

From: Stanislaw Pankevich <s(dot)pankevich(at)gmail(dot)com>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.
Date: 2012-07-06 15:44:34
Message-ID: CAFXpGYaJTEhVTiLYS5iPpPN9TUH35uJYxG4G53gky3LdjShDCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Marc, thanks for the answer.

Na, these seem not to be enough universal and easy to hook into
existing truncation strategies used in Ruby world.

On Fri, Jul 6, 2012 at 6:24 PM, Marc Mamin <M(dot)Mamin(at)intershop(dot)de> wrote:
>
>
>
> Stanislaw Pankevich wrote:
>>>> ==== PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the
>>>> fastest way to clean each
>>>> non-empty table and reset unique identifier column of empty ones ====
>
> Hello,
>
> 2 'exotic' ideas:
>
> - use dblink_send_query to do the job in multiple threads (I doubt this
> really could be faster)
> - have prepared empty tables in a separate schema, and a "garbage schema":
>
> ALTER TABLE x set schema garbage;
> ALTER TABLE prepared.x set schema "current";
>
> you should be ready for the next test,
>
> but still have to clean garbage nad moved to prepared for the next but one
> in the background....
>
> best regards,
>
> Marc Mamin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2012-07-06 15:57:05 Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.
Previous Message Stanislaw Pankevich 2012-07-06 15:27:03 Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.