Re: Delete/update with limit

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Delete/update with limit
Дата
Msg-id 1185265694.20153.79.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: Delete/update with limit  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: Delete/update with limit  (Marco Colombo <pgsql@esiway.net>)
Список pgsql-general
First of all, thanks for all the suggestions.

> put a SERIAL primary key on the table
Or:
> Maybe add OIDs to the table, and delete based on the OID number?

No, this is not acceptable, it adds overhead to the insertions. Normally
the overhead will be small enough, but on occasions it is noticeable.

> Loop Forever
>   DELETE from incoming_table;
>   VACUUM incoming_table;
> End Loop;

Not workable either, it still won't assure the table never getting too
big. Once the table is too big, it takes too much to process, and it
gets even bigger for the next time. The whole thing is transient (i.e.
the load will smooth out after a while), but then exactly when it should
work it doesn't... and if you didn't guess, the users want the results
immediately, not next day so we could do the processing at night when we
have virtually no load.

> Use partitioning: don't delete, just drop the partition after a while.

OK, this could work.

It will still be completely different than the code for the other DBs,
but it will work.

Thanks again for all the suggestions,
Csaba.




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

Предыдущее
От: "Eddy D. Sanchez"
Дата:
Сообщение: Re: about c# and postgresql
Следующее
От: "Ashish Karalkar"
Дата:
Сообщение: PgAdmin GUI on the Linux Server