Re: Chunk Delete

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Chunk Delete
Дата
Msg-id 1195395503.11052.6.camel@PCD12478
обсуждение исходный текст
Ответ на Re: Chunk Delete  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
On Thu, 2007-11-15 at 17:13 +0000, Gregory Stark wrote:
> DELETE
>   FROM atable AS x
>  USING (SELECT ctid FROM atable LIMIT 50000) AS y
>  WHERE x.ctid = y.ctid;

Have you tried to EXPLAIN this one ? Last time I tried to do something
similar it was going for a sequential scan on atable with a filter on
ctid. The other form using "where ctid = any (array(select ctid
from ..." (see my previous post forwarding Tom's suggestion) was going
for a ctid scan, which should be orders of magnitudes faster than the
sequential scan for big tables and small chunks.

Cheers,
Csaba.



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

Предыдущее
От: "Mag Gam"
Дата:
Сообщение: tsearch2 best practices
Следующее
От: MaXX
Дата:
Сообщение: Re: Compressed Backup too big