Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Anyway to accurately predict time for long running queries?
And in addition,
you may also save some performance related data (lio count, pio count, = time taken, total time taken in seconds) from important queries (every = time such queries are run) in a history table and it will help you see =patterns. I'll probably be doing something similar pretty soon for some = jobs that *must* run in between 2-3 minutes, >5 is we need to raise an = alarm. It is still in discussion stage though ... =20
Run is about 100-500 times on your system at random times with different = loads on your system. Once you have the counts, you'll get closer to = predicting. I'd probably put a disclaimer that the times provided are = estimates only ... Be prepared to build some instrumentation into your = code.
Tom Kyte has a good chapter on how to use longops ... it is better than = Metalink doc I saw IMO, YMMV.=20
ps: The name is Cary not Carrie ...=20
Raj
-------------------------------------------------------------------------=
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Cary Millsap
Sent: Tuesday, February 10, 2004 12:02 PM
To: oracle-l_at_freelists.org
Subject: RE: Anywy to accurately predict time for long running queries?
Ryan,
A couple of things to think about....
Count the LIOs and PIOs that a job requires. This will probably be some function of the number of rows the job processes. Compute the average LIO and PIO latencies for your system. Use the rough response time estimate R =3D est_LIO_count * avg_LIO_latency + est_PIO_count * avg_PIO_latency.
If you're *writing* the app yourself, then consider using the Oracle long-ops stuff. I can't remember how to access it (and my network connection is too slow to look it up right now). For example, if you have a PL/SQL loop that goes through something N times, then you update the progress meter every so often (say on iterations N/10, 2N/10, 3N/10, ...) so your user will know approximately how far along the program has gotten.
Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
* Nullius in verba *
Upcoming events:
- Performance Diagnosis 101: 2/24 San Diego, 3/23 Park City, 4/6 Seattle - SQL Optimization 101: 2/16 Dallas - Hotsos Symposium 2004: March 7-10 Dallas - Visit www.hotsos.com for schedule details...
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of ryan.gaffuri_at_cox.net
Sent: Tuesday, February 10, 2004 7:10 AM
To: oracle-l_at_freelists.org
Subject: Anywy to accurately predict time for long running queries?
People here want me to accurately predict how long it will take long running SQL to execute. I'm reading carrie milsap's book now, and I believe he has some methods that give good estimates on overall performance(I have not gotten to that part yet).
any known methods to accurately predict sql? BTW, I dont have specs on the hardware, its a customer site... and yes I know you really need that.=20
I dont think this is doable, but im wondering if anyone has put together any papers on the subject.=20
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlReceived on Tue Feb 10 2004 - 13:18:55 CST
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
![]() |
![]() |