Re: Optimizer Hint, to ignore limit and offset in optimizer plan

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Optimizer Hint, to ignore limit and offset in optimizer plan
Дата
Msg-id 20200626235954.GA3324@momjian.us
обсуждение исходный текст
Ответ на Optimizer Hint, to ignore limit and offset in optimizer plan  (Martin Handsteiner <martin.handsteiner@sibvisions.com>)
Список pgsql-sql
On Fri, Jun 26, 2020 at 08:49:19AM +0000, Martin Handsteiner wrote:
> Hello,
> 
>  
> 
> I’m aware, that taking limit and offset into account of optimizer plan is not a
> bug.
> 
> Nevertheless it is very often an unwanted feature.
> 
> As the postgres db has the issue with not supporting cursors over commit/
> rollback, it is necessary to use the limit and offset mechanism.

Uh, have you considered WITH HOLD cursors:

    WITH HOLD specifies that the cursor can continue to be used after the
    transaction that created it successfully commits.  WITHOUT HOLD
    specifies that the cursor cannot be used outside of the transaction that
    created it. If neither WITHOUT HOLD nor WITH HOLD is specified, WITHOUT
    HOLD is the default.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Optimizer Hint, to ignore limit and offset in optimizer plan
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Optimizer Hint, to ignore limit and offset in optimizer plan