Can I instruct Oracle 11g to deliberately delay query completion? [message #612066] |
Fri, 11 April 2014 10:53 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/0fa103fda85db71cdad932c288a94e3e?s=64&d=mm&r=g) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
John Watson
Messages: 8964 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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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.
|
|
|
|