Re: delete is extremely slow

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: delete is extremely slow
Дата
Msg-id 447715DD.7060506@encs.concordia.ca
обсуждение исходный текст
Ответ на Re: delete is extremely slow  (Emi Lu <emilu@encs.concordia.ca>)
Ответы Re: delete is extremely slow  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
Emi Lu wrote:

>
>>> Tried to run:
>>>
>>> delete from tableA where id <600000;
>>>
>>> It is extremely slow.
>>>
>>> id is integer and also the primary key. tableA has around 90000
>>> records.
>>>
>>> (I do not want to run truncate since I have some foreign key constraint
>>> setup based on tableA. Besides not all data I want to delete; only part
>>> of them).
>>>
>>>
>>
>>
>> Since you have some FK constrains on A, so delete each line of A will
>> confirm that it is not depended, which involves a lookup on the
>> dependent
>> table. Do you have indexes built on these dependents?
>>
>
> No, I do not have indexes setup for those dependents.
>
> If I setup index for those columns, it will speed up the deletion, right?
>
> Thank you.
>
>
http://archives.postgresql.org/pgsql-general/2003-02/msg01615.php

If deletioin is 80% data, will index helps?

Emi



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

Предыдущее
От:
Дата:
Сообщение: RES: LDAP authentication
Следующее
От: Simon Riggs
Дата:
Сообщение: How to SHOW custom variable classes?