Re: Is there a way to limit CPU usage per user - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Is there a way to limit CPU usage per user
Date
Msg-id 1139503386.22740.110.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Is there a way to limit CPU usage per user  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On Wed, 2006-02-08 at 15:42, Merlin Moncure wrote:
> > Is there a way to limit user's CPU resource specially on "SELECT" query ?
> >
> > I hava a table with a lot of rows inside, if one sloopy DB users do a
> > "SELECT * FROM bigtable"
> > then CPU resource will go near 99% and this action will surely affect
> > the other database performance ...
> >
> Yes, the answer is not to write the query in the first place :-).  you
> can implement cursors, do client side browsing, or other techiniques
> to handle this problem more elegantly.
>
> try to follow rule of thumb to return minimal amount of data necessary
> to the client.

Note that another useful tip here is to use slony to produce as many
replicants as needed to handle that kind of thing.

We have our production pgsql machines in a slony setup, with pg01 being
accessible by the application that inserts and updates the data, and all
reporting apps hit pg02 and up to do selects and such.

pgsql-general by date:

Previous
From: Shelby Cain
Date:
Subject: Re: [ODBC] Problem using ODBC from .NET framework
Next
From: Tom Lane
Date:
Subject: Re: PQputline error with pg_restore