pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18620: Problem: Slow Delete Operation
2+ messages / 2 participants
[nested] [flat]
* BUG #18620: Problem: Slow Delete Operation
@ 2024-09-16 18:54 PG Bug reporting form <noreply@postgresql.org>
2024-09-16 19:51 ` Re: BUG #18620: Problem: Slow Delete Operation David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2024-09-16 18:54 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: gowthamraj.kennedykannan@chainsys.com
The following bug has been logged on the website:
Bug reference: 18620
Logged by: gowtham
Email address: gowthamraj.kennedykannan@chainsys.com
PostgreSQL version: 15.6
Operating system: Windows
Description:
Problem: Slow Delete Operation
Issue: Deleting 4000 records from a parent table is taking more than 1
hour.
Database Structure:
Parent Table: Contains primary keys, referenced by foreign keys in child
tables.
Child Tables: 3 tables, each having foreign key constraints linked to the
parent table's primary keys.
Data Size: All tables contain over a million records.
Indexing: Indexes have been created on all primary keys in both the parent
and child tables.
Tested Scenarios:
Index Rebuilding: Rebuilding indexes on both the parent and child tables did
not improve the delete performance.
Recreating Parent Table: Recreating the parent table with the same data and
constraints also did not resolve the slowness issue.
Foreign Key Removal: When the foreign key constraints were removed from the
child tables, deleting 4000 records from the parent table took only a few
seconds. This suggests the foreign key checks are causing the slowness.
Requirement:
Improve the performance of the delete operation without removing the foreign
key constraints.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18620: Problem: Slow Delete Operation
2024-09-16 18:54 BUG #18620: Problem: Slow Delete Operation PG Bug reporting form <noreply@postgresql.org>
@ 2024-09-16 19:51 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2024-09-16 19:51 UTC (permalink / raw)
To: gowthamraj.kennedykannan@chainsys.com <gowthamraj.kennedykannan@chainsys.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Monday, September 16, 2024, PG Bug reporting form <noreply@postgresql.org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 18620
> Logged by: gowtham
> Email address: gowthamraj.kennedykannan@chainsys.com
> PostgreSQL version: 15.6
> Operating system: Windows
> Description:
>
> Problem: Slow Delete Operation
>
> Issue: Deleting 4000 records from a parent table is taking more than 1
> hour.
>
> Requirement:
> Improve the performance of the delete operation without removing the
> foreign
> key constraints.
>
>
You can do this yourself - just index the foreign key columns.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-09-16 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 18:54 BUG #18620: Problem: Slow Delete Operation PG Bug reporting form <noreply@postgresql.org>
2024-09-16 19:51 ` David G. Johnston <david.g.johnston@gmail.com>
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