Re: In progress INSERT wrecks plans on table

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: In progress INSERT wrecks plans on table
Дата
Msg-id CA+U5nMKMfZUEimZ9=oF2wJ-WkiGhMw3mQjUFT6PBGofUpmXL8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: In progress INSERT wrecks plans on table  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: In progress INSERT wrecks plans on table  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
Список pgsql-performance
On 3 May 2013 13:41, Simon Riggs <simon@2ndquadrant.com> wrote:

> (3) to make the check on TransactionIdIsInProgress() into a heuristic,
> since we don't *need* to check that, so if we keep checking the same
> xid repeatedly we can reduce the number of checks or avoid xids that
> seem to be long running. That's slightly more coding than my quick
> hack here but seems worth it.
>
> I think we need both (1) and (3) but the attached patch does just (1).
>
> This is a similar optimisation to the one I introduced for
> TransactionIdIsKnownCompleted(), except this applies to repeated
> checking of as yet-incomplete xids, and to bulk concurrent
> transactions.

ISTM we can improve performance of TransactionIdIsInProgress() by
caching the procno of our last xid.

Mark, could you retest with both these patches? Thanks.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Anne Rosset
Дата:
Сообщение: Re: Deterioration in performance when query executed in multi threads
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: In progress INSERT wrecks plans on table