Re: Issue with delete

Поиск
Список
Период
Сортировка
От Radoulov, Dimitre
Тема Re: Issue with delete
Дата
Msg-id 7e32529f-5692-1838-8468-4b8deff424ea@gmail.com
обсуждение исходный текст
Ответ на Re: Issue with delete  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-admin
On 24/06/2021 16.48, Guillaume Lelarge wrote:
Le jeu. 24 juin 2021 à 16:02, Radoulov, Dimitre <cichomitiko@gmail.com> a écrit :


Am 24.06.21 um 11:08 schrieb Rohit Rajput:
Good day everyone,

I have few tables where i need to delete above 50 million rows each. Since i dont want to delete them all in one shot and block my table for extended time, i am trying to use limit with delete but its giving me error every time. May i please get some assistance here? Thanks

Here is what i am running:

delete from mytable where id in (select id from mytable where condition=true limit 1000);


Wouldn't "delete from mytable where condition=true limit 1000" be sufficient?



That syntax doesn't exist.


I should have tried the statement before asking, thanks!
I got confused by other databases (used it on Db2).


Best regards
Dimitre

В списке pgsql-admin по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Issue with delete
Следующее
От: Avadhut Narayan Joshi
Дата:
Сообщение: Can we connect SSAS,SSIS,SSRS to PostgresSQL DB ?