Re: Enhancement Request

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Enhancement Request
Date: 2024-01-31 19:32:15
Message-ID: e9c5720a-6d8e-67ae-f20f-3f13bf99058f@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Cheat a bit....
Use a CTE with a limit on the select and then delete everything from the
CTE.

Campbell, Lance wrote on 1/31/2024 2:29 PM:
>
> It would be nice if the DELETE FROM supported LIMIT. I can already
> feel the dislike for this post coming back in my direction.
>
> I have had numerous times over the years where I need to delete a lot
> of rows from a table but because each row is linked to so many other
> tables it will cause a problem in performance if I don’t limit the
> size of the deletion.
>
> Just throwing this out there.
>
> Thanks,
>
> Lance
>

Regards,

Michael Vitale

Michaeldba(at)sqlexec(dot)com <mailto:michaelvitale(at)sqlexec(dot)com>

703-600-9343

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alex Balashov 2024-01-31 19:32:48 Re: Enhancement Request
Previous Message Campbell, Lance 2024-01-31 19:29:40 Enhancement Request