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

From Luki Rustianto
Subject Re: Is there a way to limit CPU usage per user
Date
Msg-id a87d9f3a0602092030q7784f4eai39b169f18538047d@mail.gmail.com
Whole thread Raw
In response to Re: Is there a way to limit CPU usage per user  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Is there a way to limit CPU usage per user  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
So how can we terminate such a long running query ?

The idea is to make a crontab to periodicaly do a job to search a
typical "SELECT * FROM bigtable" query who has run for some hours then
to terminate them...



On 2/9/06, Merlin Moncure <mmoncure@gmail.com> 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.
>
> Merlin
>

pgsql-general by date:

Previous
From: "surabhi.ahuja"
Date:
Subject: Re: r trim of characters other than space
Next
From: Michael Fuhr
Date:
Subject: Re: Return more then one value using PL