pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Index
Date: Sun, 10 Mar 2024 12:48:24 +0100
Message-ID: <7d714ce571752dd8c9f2de7b2583e43c1ff4cd96.camel@cybertec.at> (raw)
In-Reply-To: <CAJk5AtZqnqPdoajrRM4sAEjAP=zM5d7bQ1=VY_EKJ=9vV+H+Gg@mail.gmail.com>
References: <CAJk5AtZqnqPdoajrRM4sAEjAP=zM5d7bQ1=VY_EKJ=9vV+H+Gg@mail.gmail.com>

On Sun, 2024-03-10 at 16:49 +0530, Rajesh Kumar wrote:
> I have a table where size is increasing daily. In that table only inserts and
> deletes happens. This table is referencing 15 other tables. We have given
> delete cascade, so if a row is deleted in parent table,  the matching records
> will also be deleted in those child tables. 
> 
> It is taking lot of time to delete. So, I am planning to create index on those child tables. 
> 
> My question is, apart from inserts, I am only going to delete records from those
> tables. How index improves performance for deleting records? How index is affected
> or how to do index management in this case?

https://www.cybertec-postgresql.com/en/index-your-foreign-key/

Yours,
Laurenz Albe





view thread (15+ messages)  latest in thread

Message-ID: <7d714ce571752dd8c9f2de7b2583e43c1ff4cd96.camel@cybertec.at>
Permalink:  ../7d714ce571752dd8c9f2de7b2583e43c1ff4cd96.camel@cybertec.at/
Also on:    postgresql.org/message-id/7d714ce571752dd8c9f2de7b2583e43c1ff4cd96.camel@cybertec.at

 · 

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-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Index
  In-Reply-To: <7d714ce571752dd8c9f2de7b2583e43c1ff4cd96.camel@cybertec.at>

* 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