dbTalk Databases Forums  

Abort slow queries

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Abort slow queries in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Abort slow queries - 02-20-2009 , 05:51 AM






Is there any client setting to abort queries that take longer than X
seconds?

I'm developing web apps written in PHP 5.2 running as Apache 2.2 module
with Oracle backend (via OCI8). I'm using Oracle Instant Client 10.2 to
connect with a remove Oracle 9i Server (9.2.0.1.0). Sometimes I run a
poorly written or just plain wrong query while developing and the Oracle
server goes berserk (99% CPU, slow responsiveness). I can hardly do
anything else until it finishes the query or I ask the sysadmin to
restart the service. Even restarting my own PC has no effect.

PHP has a max_execution_time but it doesn't affect external processes.



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--

Reply With Quote
  #2  
Old   
ddf
 
Posts: n/a

Default Re: Abort slow queries - 02-20-2009 , 08:32 AM






On Feb 20, 5:51*am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH... (AT) demogracia (DOT) com> wrote:
Quote:
Is there any client setting to abort queries that take longer than X
seconds?

I'm developing web apps written in PHP 5.2 running as Apache 2.2 module
with Oracle backend (via OCI8). I'm using Oracle Instant Client 10.2 to
connect with a remove Oracle 9i Server (9.2.0.1.0). Sometimes I run a
poorly written or just plain wrong query while developing and the Oracle
server goes berserk (99% CPU, slow responsiveness). I can hardly do
anything else until it finishes the query or I ask the sysadmin to
restart the service. Even restarting my own PC has no effect.

PHP has a max_execution_time but it doesn't affect external processes.

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://bits.demogracia.com
-- Mi web de humor al baño María:http://www.demogracia.com
--
Set up a resource profile which limits CPU and memory usage and
associate that with the user account executing the queries. Should a
query exceed the set limits it will be killed by Oracle. Start
reading here

http://download.oracle.com/docs/cd/B...htm#SQLRF01310


David Fitzjarrell


Reply With Quote
  #3  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: Abort slow queries - 02-23-2009 , 06:38 AM



ddf escribió:
Quote:
Is there any client setting to abort queries that take longer than X
seconds?

Set up a resource profile which limits CPU and memory usage and
associate that with the user account executing the queries. Should a
query exceed the set limits it will be killed by Oracle. Start
reading here

http://download.oracle.com/docs/cd/B...htm#SQLRF01310
Thank you very much, it looks exactly what I need.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.