Re: Function with raise notice statements taking too long - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Function with raise notice statements taking too long
Date
Msg-id alpine.BSO.2.00.1005261516270.15571@leary.csoft.net
Whole thread Raw
In response to Function with raise notice statements taking too long  (Altaf Malik <mmalik_altaf@yahoo.com>)
List pgsql-jdbc

On Wed, 26 May 2010, Altaf Malik wrote:

>  I have a plpgsql function with raise notice statements in a loop. When I
> call this function from JDBC, it takes almost 5 minutes to execute. However,
> if I invoke it through pgAdminIII, it gets executed in just 12 seconds. The
> code of the function is given below:
>
> [plpgsql function issuing a ton of RAISE NOTICE statements]
>
> Any clue why JDBC is performing too slow?
>

I've committed a fix to CVS to fix this performance issue.  We were
only tracking the head of the SQLWarning list so adding a new warning
was O(N).  Now we track the tail of the list as well, so adding new
warnings is quick.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Altaf Malik
Date:
Subject: Function with raise notice statements taking too long
Next
From: Craig Ringer
Date:
Subject: Re: New code: Easy PKCS#12 client certificate support for pgjdbc