Re: How to optimize insert statements ?

От: Christian Leclerc
Тема: Re: How to optimize insert statements ?
Дата: ,
Msg-id: 1F31510056BF344C8D1076017C1367FA0FCF2A@parmbx02.ilog.biz
(см: обсуждение, исходный текст)
Ответ на: Re: How to optimize insert statements ?  (Tom Lane)
Ответы: Re: How to optimize insert statements ?  (Sean Davis)
Список: pgsql-novice

Скрыть дерево обсуждения

How to optimize insert statements ?  ("Christian Leclerc", )
 Re: How to optimize insert statements ?  (Tom Lane, )
  Re: How to optimize insert statements ?  ("Christian Leclerc", )
   Re: How to optimize insert statements ?  (Sean Davis, )
    Re: How to optimize insert statements ?  ("Christian Leclerc", )

Hello Tom,

Thanks for your reply and advise. I understand in your email that the
use of a sequence object will increase the performance of my trigger.
Therefore I'm going to replace that in my code immediately. Anyway, my
problem is not exactly the performances; it's more the insertion time
growing. Indeed I don't understand why the insertion time grows
"exponentially" with my single transaction. If I split my objects
insertion into several transactions (instead of one), the problem seems
to disappear. Would you see any reasons linked to the Postgres
transactions explaining this insertion time growing ?

Regards,
Christian


-----Original Message-----
From: Tom Lane [mailto:]
Sent: Tuesday, July 24, 2007 4:33 PM
To: Christian Leclerc
Cc: 
Subject: Re: [NOVICE] How to optimize insert statements ?

"Christian Leclerc" <> writes:
> I'm encountering a performance issue with insert statements.

It looks to me like your trigger is the entire cause of the slowness.
I think you would be well advised to get rid of it and use a serial
column (ie a sequence object) instead of a handmade, poorly performing
substitute for sequences.

            regards, tom lane


В списке pgsql-novice по дате сообщения:

От: Sean Davis
Дата:
Сообщение: Re: How to optimize insert statements ?
От: "Christian Leclerc"
Дата:
Сообщение: Re: How to optimize insert statements ?