Re: Why are stored procedures looked on so negatively? - Mailing list pgsql-general

From Steve Atkins
Subject Re: Why are stored procedures looked on so negatively?
Date
Msg-id 05223EBA-410D-4CFD-A07B-6DF66B5F43AB@blighty.com
Whole thread Raw
In response to Re: Why are stored procedures looked on so negatively?  (Some Developer <someukdeveloper@gmail.com>)
Responses Re: Why are stored procedures looked on so negatively?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
On Jul 25, 2013, at 1:44 AM, Some Developer <someukdeveloper@gmail.com> wrote:
>>
>
> When I was talking about improving speed I was talking about reducing load on the app servers by putting more of the
workload on the database server. I know that it won't actually save CPU cycles (one of the machines has to do it) but
itwill save load on the app servers. As I said above using the asynchronous abilities of libpq helps keep the app
serversserving requests whilst the database gets on with its tasks. 
>

App servers don't tend to maintain much global state, so are almost perfectly parallelizable. If you run out of CPU
there,drop another cheap box in the rack. 

Database servers aren't. Once you top out a database server your main options are to replace it with a bigger box
(increasinglyexpensive) or rearchitect the application (even more expensive). 

I'll always put more work on the cheaply scalable app servers if I can reduce the load on the database. Moving code to
thedatabase server for reasons of CPU cost (as opposed to, say, data or business rule consistency) seems an odd
approach.

Cheers,
  Steve



pgsql-general by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: Rule Question
Next
From: Sandeep Gupta
Date:
Subject: group by query plan on already clustered index