Re: Need info: pl/pgsql performance

From: Kovacs Zoltan Sandor <tip(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>
To: najm Hashmi <najm(at)mondo-live(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, ltibor(at)mail(dot)tiszanet(dot)hu
Subject: Re: Need info: pl/pgsql performance
Date: 2000-10-31 16:20:42
Message-ID: Pine.LNX.4.05.10010311655040.18402-100000@pc10.radnoti-szeged.sulinet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Mon, 23 Oct 2000, najm Hashmi wrote:

> Hi, I would to know if there is any articles or books that talk about
> pl/pgsql performance especially versus C. Thanking you in advance for
> your help.
I can only say what the documentation says about it in the "Overview"
section (please read it if you hadn't done it yet). In practical use I
didn't feel any disadvantages in speed comparing to simple queries from
psql prompt. Recursive PLPGSQL functions may be slow but I don't think it
depends on PLPGSQL internals---IMHO the same queries would be slow from C
as well. The performance generally depends on the number of queries you
send. I don't suggest submitting a large amount of queries to the server
waiting for a few rows of results---I think it's much better submitting a
few queries and getting lots of rows.

If a query in Postgres can be solved in a fast way using SQL queries,
from PLPGSQL you can feel the same speed. I didn't experience any
differences in speed comparing SQL language functions and PLPGSQL langauge
ones, too. For me writing PLGPSQL functions are much easier because its
logic is similar to other programming languages, not like SQL's logic. But
some people are familiar with the SQL logic. For them I suggest using SQL
functions which are in general enough for everything.

Unfortunately I didn't see any benchmark about these things. I am also
interested in them. Jan, are you still using your own created language?

Zoltan

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Edmar Wiggers 2000-10-31 16:31:29 RE: INSERT [IGNORE] INTO TABLE
Previous Message Petr Jezek 2000-10-31 16:05:17 INSERT [IGNORE] INTO TABLE