Re: Major Performance issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Major Performance issue
Дата
Msg-id 3503.1111909747@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Major Performance issue  (John Hughes <jondo2010@gmail.com>)
Список pgsql-general
John Hughes <jondo2010@gmail.com> writes:
> The problem is that inserting into temp_holding takes more than a SECOND PER
> ROW!

Offhand I'd bet on the repeated computations of max(core_leads.id) as
being the bulk of the problem.  That's completely broken anyway since
if concurrent insertions are happening there's no guarantee you'll
get the same result each time.  Consider using a sequence to
generate these IDs, and doing just one nextval() not several per
trigger call.

            regards, tom lane

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

Предыдущее
От: Dan Sugalski
Дата:
Сообщение: Re: Perl and AutoCommit
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Debugging deadlocks