pg.ddx.io  pgsql-in-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Atul Kumar <akumar14871@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: time taking deletion on large tables
Date: Thu, 3 Dec 2020 15:51:26 +0100
Message-ID: <20201203145126.GA4726@depesz.com> (raw)
In-Reply-To: <CA+ONtZ7RTPhQraWw13Dr06HqCU5LZxkBPopYoPam84kNw_RwCg@mail.gmail.com>
References: <CA+ONtZ541OzW3dzrUKcXscTYAK8G_3DEtUhFz+i2+HsD3-5ffQ@mail.gmail.com>
	<CA+ONtZ7RTPhQraWw13Dr06HqCU5LZxkBPopYoPam84kNw_RwCg@mail.gmail.com>

On Thu, Dec 03, 2020 at 08:15:06PM +0530, Atul Kumar wrote:
> Hi,
> 
> The feed_posts table has over 50 Million rows.
> 
> When I m deleting all rows of a certain type that are over 60 days old.

The common solution to this problem is to partition, and then, instead
of deleting rows - delete old partitions.

depesz





view thread (13+ messages)  latest in thread

Message-ID: <20201203145126.GA4726@depesz.com>
Permalink:  ../20201203145126.GA4726@depesz.com/
Also on:    postgresql.org/message-id/20201203145126.GA4726@depesz.com

 · 

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-in-general@postgresql.org
  Cc: depesz@depesz.com, akumar14871@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: time taking deletion on large tables
  In-Reply-To: <20201203145126.GA4726@depesz.com>

* 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