Re: plpgsql functions vs. embedded queries - Mailing list pgsql-novice

From John DeSoi
Subject Re: plpgsql functions vs. embedded queries
Date
Msg-id 1A05FF7F-A5F6-43B2-89BF-AB6C7C2352F0@pgedit.com
Whole thread Raw
In response to plpgsql functions vs. embedded queries  ("Wright, George" <George.Wright@infimatic.com>)
Responses Re: plpgsql functions vs. embedded queries
List pgsql-novice
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
> queries?

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.





pgsql-novice by date:

Previous
From: "Wright, George"
Date:
Subject: plpgsql functions vs. embedded queries
Next
From: "Wright, George"
Date:
Subject: Re: plpgsql functions vs. embedded queries