Re: Chunk Delete

Поиск
Список
Период
Сортировка
От Alexander Staubo
Тема Re: Chunk Delete
Дата
Msg-id 88daf38c0711150546r11ca2e5exce6dbead5dacdcbc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Chunk Delete  ("Abraham, Danny" <danny_abraham@bmc.com>)
Ответы Re: Chunk Delete
Re: Chunk Delete
Список pgsql-general
On 11/15/07, Abraham, Danny <danny_abraham@bmc.com> wrote:
> With Oracle we do it with: delete ,tname>   where  <cond> and rownum < Y;

You could create a temporary sequence:

  create temporary sequence foo_seq;
  delete from foos where nextval('foo_seq') < 50000;

I'm not sure how fast nextval() is, even on temporary sequences; but
it should be reasonably fast.

If it's a FIFO queue, the table surely has some explicit order through
a column which you will need as part of the query?

Alexander.

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

Предыдущее
От: "Abraham, Danny"
Дата:
Сообщение: Chunk Delete
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Chunk Delete