| От | Bruno Wolff III |
|---|---|
| Тема | Re: Postgresql "FIFO" Tables, How-To ? |
| Дата | |
| Msg-id | 20030716165051.GD1263@wolff.to обсуждение исходный текст |
| Ответ на | Re: Postgresql "FIFO" Tables, How-To ? ("Kirill Ponazdyr" <softlist@codeangels.com>) |
| Список | pgsql-general |
On Wed, Jul 16, 2003 at 18:18:09 +0200, Kirill Ponazdyr <softlist@codeangels.com> wrote: > > Ouch, this means that for every insert we would have to trigger a > procedure which will: > > COUNT > IF > Limit > DELETE OLDEST > > This would be pretty much damn ressource intensive on a table with million > of records, would not it ? If you preload the database with the required number of records, then you don't need to count. You can just delete the oldest record. You can use a sequence or timestamp to order the records for this purpose. If you don't to see the dummy records you can flag them somehow. But if you reach the limit in a short time you might not really care about that enough to add the extra overhead.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера