PL/PGSQL and PL/Perl time issues

PL/PGSQL and PL/Perl time issues

Post by Travis Baue » Thu, 21 Mar 2002 02:38:58



I have a PL/PGSQL routine that does one select and a lot (~400 lines) of
floating point computations.  In rapid succession my JDBC application calls
this routine about 170 times.  It gets slower as time drags on, taking
around 5 seconds per call at the beginning and ending up taking about 15
seconds per call at the end.

I have a much shorter (about 10 lines), but less efficient PL/Perl routine
that accomplishes the same computation, but does a lot of string matching
and runs slower.  But the same problem occurs Each call takes longer the
more I call it.

Are there postgress issues I should be aware of regarding calling pl/pgsql
and pl/perl routines, or using JDBC to call these routines?  Is there a way
to prevent this increase in time?

Thanks,
--
Travis Bauer
http://www.cs.indiana.edu/~trbauer

 
 
 

PL/PGSQL and PL/Perl time issues

Post by Travis Baue » Thu, 21 Mar 2002 03:07:59


As a followup:

Through the JDBC driver, I set autocommit to false.

At one point when I stopped the program in midstream, the server coughed up
the following message *many* times:

pq_flush: send() failed: Broken pipe

Thanks,
Travis


> I have a PL/PGSQL routine that does one select and a lot (~400 lines) of
> floating point computations.  In rapid succession my JDBC application
> calls
> this routine about 170 times.  It gets slower as time drags on, taking
> around 5 seconds per call at the beginning and ending up taking about 15
> seconds per call at the end.

> I have a much shorter (about 10 lines), but less efficient PL/Perl routine
> that accomplishes the same computation, but does a lot of string matching
> and runs slower.  But the same problem occurs Each call takes longer the
> more I call it.

> Are there postgress issues I should be aware of regarding calling pl/pgsql
> and pl/perl routines, or using JDBC to call these routines?  Is there a
> way to prevent this increase in time?

> Thanks,

--
Travis Bauer
http://www.cs.indiana.edu/~trbauer

 
 
 

1. Performance of c, pl/perl, pl/pgsql

Hello

Has anyone benchmarked how slow/fast the procedural languages are. I know
that pl/perl is probably faster than pl/pgsql. But how much? How much
faster are native c-functions...

ps. Is there any good documentation on pl/perl. The programmers manual
didn't have much information.

- Einar Karttunen

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

2. Can anyone help me with printer settings?

3. pgsql/src/pl/plpgsql/src Tag: REL7_1_STABLE pl ...

4. SQL problems

5. Converting PL/SQL to PL/PGSQL

6. Referential Integrity Enforcement: Do With Constraints or Triggers?

7. pgsql-server/src/pl/plpython error.expected pl ...

8. Novell Clients to SQL Server 7

9. pgsql/ ontrib/rtree_gist/rtree_gist.c rc/pl/pl ...

10. pgsql/contrib/intarray/bench (bench.pl create_test.pl)

11. pgsql/src/pl/plpgsql/src Tag: REL7_2_STABLE pl ...

12. pgsql/src/pl/plperl Makefile.PL

13. pgsql/src/pl/plpgsql/src Tag: REL7_2_STABLE pl ...