Luki Rustianto wrote:
Hi All,
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 ...
Not really - this is something for the operating-system, but most don't
provide sophisticated ways of managing processes running under one user
(postgres in this case).
If there are 5 queries going on, each should end up getting about 20% of
the resources anyway, if your OS is balancing things properly.
If a query needs a lot of CPU and you restrict it, then that query will
presumably run for longer and so affect more queries from other users.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match