Re: Is there any way to speed up PL/TCL functions? - Mailing list pgsql-general

From Tom Lane
Subject Re: Is there any way to speed up PL/TCL functions?
Date
Msg-id 23362.964418697@sss.pgh.pa.us
Whole thread Raw
In response to Is there any way to speed up PL/TCL functions?  ("Robert B. Easter" <reaster@comptechnews.com>)
List pgsql-general
"Robert B. Easter" <reaster@comptechnews.com> writes:
> I'm using some PL/TCL functions and triggers to do some special
> inserts.  When I do an insert that uses these procedures, I get the
> "INSERT xxxxxx 1" response back immediately, but then there is a pause
> before the next query is executed.  It appears as if the PL/TCL runs
> fast but after its finished it has to spend a significant amount of
> time cleaning up before the next query can run.

That doesn't make any sense as stated, but it might be that your
triggers are "deferred" (execute-at-commit).  I believe the INSERT
command response gets sent before transaction commit, so what's
probably really happening is just that your trigger is slow.

> Is this the way it is?  Any way to reduce this pause?

Hard to say without knowing what your trigger is doing.

            regards, tom lane

pgsql-general by date:

Previous
From: "Robert B. Easter"
Date:
Subject: Is there any way to speed up PL/TCL functions?
Next
From: "Alex Bolenok"
Date:
Subject: Re: how connect visual basic to pgsql?