Re: [PERFORM] Trigger performance problem

2005-05-17 Thread Tom Lane
Manuel Wenger [EMAIL PROTECTED] writes: We're having a performance problem with PostgresQL 8.0.2 running on RHEL3 Update 4. There is a frequently updated table logging all our ADSL customer logins which has 2 related triggers. An INSERT on that table, calls, takes about 300ms to execute

Re: [PERFORM] Trigger performance problem

2005-05-17 Thread lists
---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [PERFORM] Trigger performance

2004-01-23 Thread Pavel Stehule
Hello try prepared statements, PQexecPrepared http://developer.postgresql.org/docs/postgres/libpq-exec.html Regards Pavel Stehule On Thu, 22 Jan 2004, pginfo wrote: Hi, thanks for the answer. It is very interest, because I readet many times that if I write the trigger in C it will work

Re: [PERFORM] Trigger performance

2004-01-22 Thread Tom Lane
pginfo [EMAIL PROTECTED] writes: I was supprised that the pgsql trigger take ~8 sec. to insert this rows and the C trigger take ~ 17 sec. The reason is that plpgsql caches the plan for the invoked SELECT, whereas the way you coded the C function, it's re-planning that SELECT on every call.

Re: [PERFORM] Trigger performance

2004-01-22 Thread pginfo
Hi, thanks for the answer. It is very interest, because I readet many times that if I write the trigger in C it will work faster. In wich case will this trigger work faster if write it in C? In all my triggres I have select or insert into mytable select ... or update mytable set ...where

Re: [PERFORM] Trigger performance

2004-01-22 Thread pginfo
Ok, thanks. I will do it. regards, ivan. Tom Lane wrote: pginfo [EMAIL PROTECTED] writes: In wich case will this trigger work faster if write it in C? Given that the dominant part of the time will be spent down inside SPI in either case, I doubt you will be able to see much difference.