Re: Any risks in using FUNCTIONs (stored procedures) instead of raw sql queries? - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Any risks in using FUNCTIONs (stored procedures) instead of raw sql queries?
Date
Msg-id 1227122120.11755.27.camel@jd-laptop.pragmaticzealot.org
Whole thread Raw
In response to Re: Any risks in using FUNCTIONs (stored procedures) instead of raw sql queries?  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Any risks in using FUNCTIONs (stored procedures) instead of raw sql queries?  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Wed, 2008-11-19 at 18:40 +0900, Craig Ringer wrote:
> Phoenix Kiula wrote:
>
> > I have googled but it looks like there's a whole variety of
> > information from 2003 (when PG must have been quite different) until
> > now--some people find stored functions slow for web based apps, others
> > find it is worth the maintenance.
>
> If your web servers are very close in network terms to your database
> server, issue mostly non-trivial queries, and are on a low latency link,
> it probably doesn't matter *that* much.

For one query no... for a dynamic website that uses 100 - 200 queries to
draw a page?

....

15ms * 200, 3000ms = 3 secs * 2 (both ways) = 6 seconds.

Joshua D. Drake

--


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: tracking down a warning
Next
From: WireSpot
Date:
Subject: Prepared statement already exists