From: | "Campbell, Lance" <lance(at)illinois(dot)edu> |
---|---|
To: | M Sarwar <sarwarmd02(at)outlook(dot)com>, "Hajek, Nick" <Nick(dot)Hajek(at)vishay(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | RE: Enhancement Request |
Date: | 2024-01-31 20:50:22 |
Message-ID: | SJ0PR11MB562962A2E3FE47E79BB85C26DE7C2@SJ0PR11MB5629.namprd11.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
No. I was submitting a request that we could add LIMIT to DELETE FROM. There are work arounds for this. But it would be nice to skip the work arounds.
From: M Sarwar <sarwarmd02(at)outlook(dot)com>
Sent: Wednesday, January 31, 2024 2:47 PM
To: Hajek, Nick <Nick(dot)Hajek(at)vishay(dot)com>; Campbell, Lance <lance(at)illinois(dot)edu>; pgsql-admin(at)postgresql(dot)org
Subject: Re: Enhancement Request
Nick,
@Hajek, Nick<mailto:Nick(dot)Hajek(at)vishay(dot)com>
Are you confirming that DELETE FROM - LIMIT is working?
Thanks,
Sarwar
________________________________
From: Hajek, Nick <Nick(dot)Hajek(at)vishay(dot)com<mailto:Nick(dot)Hajek(at)vishay(dot)com>>
Sent: Wednesday, January 31, 2024 2:34 PM
To: Campbell, Lance <lance(at)illinois(dot)edu<mailto:lance(at)illinois(dot)edu>>; pgsql-admin(at)postgresql(dot)org<mailto:pgsql-admin(at)postgresql(dot)org> <pgsql-admin(at)postgresql(dot)org<mailto:pgsql-admin(at)postgresql(dot)org>>
Subject: RE: Enhancement Request
// 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.
I use a query like this to accomplish a limited deletion -
Delete from table1 where table1.id in (select table1.id from table1 limit yourlimitnumber)
From | Date | Subject | |
---|---|---|---|
Next Message | Hajek, Nick | 2024-01-31 20:50:48 | RE: Enhancement Request |
Previous Message | M Sarwar | 2024-01-31 20:47:10 | Re: Enhancement Request |