I did neither but will try both, thank you.
The functions took on average more than 10 times as long.
From: John DeSoi [mailto:desoi(at)pgedit(dot)com]
Sent: Monday, September 29, 2008 1:16 PM
To: Wright, George
Subject: Re: [NOVICE] plpgsql functions vs. embedded queries
On Sep 29, 2008, at 9:50 AM, Wright, George wrote:
> Are funtions in plpgsql always slower than embedding sql queries in
> string form in code like PHP?
> I ran several tests and they seemed to always perform that way. I
> would have thought the pre-planning would have made them faster.
> Would re-writing the functions C make them faster than the embedded
I'd say no, they should not always be slower. Did you try preparing
your PHP call to the function? Did you mark your function as STABLE if
you are not modifying the database?
John DeSoi, Ph.D.
In response to
pgsql-novice by date
|Next:||From: Tom Lane||Date: 2008-09-29 23:07:11|
|Subject: Re: plpgsql functions vs. embedded queries |
|Previous:||From: John DeSoi||Date: 2008-09-29 17:15:33|
|Subject: Re: plpgsql functions vs. embedded queries|