Re: Delete performance

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: Delete performance
Дата
Msg-id 4A3531A0.5060102@sympatico.ca
обсуждение исходный текст
Ответ на Re: Delete performance  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-novice
Frank Bax wrote:
> Jana wrote:
>>
>> Hello,
>> i have a table with about 250m records from which i want to delete
>> thoose not contained in other table. I used this SQL query:
>> DELETE FROM data_structures_items WHERE id_data_structure NOT IN (
>> SELECT id_structure FROM data_structures);
>
>
> DELETE FROM data_structures_items, data_structures WHERE
> data_structures_items.id_data_structure =
> data_structures.id_data_structure AND
> data_structures_items.id_data_structure IS NULL;
>

Sorry; that should probably be:

DELETE FROM data_structures_items, data_structures WHERE
data_structures_items.id_data_structure =
data_structures.id_data_structure AND
data_structures.id_data_structure IS NULL;

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

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: Delete performance
Следующее
От: Jana
Дата:
Сообщение: Re: Delete performance