RE: Enhancement Request
От | Hajek, Nick |
---|---|
Тема | RE: Enhancement Request |
Дата | |
Msg-id | CH0PR02MB81063B5272D9663465788281E57C2@CH0PR02MB8106.namprd02.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Enhancement Request (M Sarwar <sarwarmd02@outlook.com>) |
Ответы |
Re: Enhancement Request
Re: Enhancement Request |
Список | pgsql-admin |
[ External Email ]
// Are you confirming that DELETE FROM - LIMIT is working?
No, I don’t believe you can use limit in the delete itself but you can use it in a subselect and accomplish the same thing as shown in the example below.
// 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)
В списке pgsql-admin по дате отправления: