Home » RDBMS Server » Performance Tuning » Can I instruct Oracle 11g to deliberately delay query completion? (Oracle 11g)
Can I instruct Oracle 11g to deliberately delay query completion? [message #612066] Fri, 11 April 2014 10:53 Go to next message
jvanh
Messages: 17
Registered: August 2013
Junior Member

Hi,

For investigation purposes I have a need to deliberately delay query completion at Oracle level, i.e. make a simple query execution very, very slow as if it's hanging so to say.

I want to be able to see behavior of app servers and EARs and their respective, configurable and hardcoded, time-out settings.

Does anyone have experience with this, a tip on how to configure/tweak Oracle to do so?

Thanks!
Re: Can I instruct Oracle 11g to deliberately delay query completion? [message #612067 is a reply to message #612066] Fri, 11 April 2014 11:01 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
How about something like this:
orclz>
orclz> create or replace function snooze return number as begin
  2  dbms_lock.sleep(3);
  3  return 1;
  4  end;
  5  /

Function created.

orclz> set timing on
orclz> select dname,snooze from dept;

DNAME              SNOOZE
-------------- ----------
ACCOUNTING              1
RESEARCH                1
SALES                   1
OPERATIONS              1

Elapsed: 00:00:12.01
orclz>

Re: Can I instruct Oracle 11g to deliberately delay query completion? [message #612175 is a reply to message #612067] Mon, 14 April 2014 02:24 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Hah, I looked at this literally last Thursday for the same reason - to demonstrate a misbehaving app.

I couldnt change code, the best I managed was a logon trigger which we could toggle that added a sleep/hang, the other alternate was the rather drastic underscore to change the optimizer seeds in plan generation. That seemed a bit of a hatchet job/bad idea though so I wont post the specific hint here.
Re: Can I instruct Oracle 11g to deliberately delay query completion? [message #612247 is a reply to message #612175] Tue, 15 April 2014 04:55 Go to previous message
jvanh
Messages: 17
Registered: August 2013
Junior Member
Hi - thanks for the feedback!
Previous Topic: Its confusing me lot....
Next Topic: query optimization phase
Goto Forum:
  


Current Time: Thu Mar 28 12:59:54 CDT 2024