[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] actual execution time for select to process



That's as close as you're going to get without having actual database access 
through a tool such as sql*plus, toad, oem or whatever, and maybe running an 
explain on your code.  Even then, the actual execution time will vary upon a 
lot of factors, including whether the query is in cache, or if there has 
been a lot of dml run on the tables affected by the query.  Additionally, 
how long ago statistics was run will be important, as well as any new or 
removed indexes.

I guess I am missing *why* *you* need such accurate measurements of sql 
execution timing; that's why you keep DBAs around.

peace,
clark 'the dragon' willis



PSA: Salary <> Slavery. If you earn a salary, your employer is renting your 
services for 40 hours a week, not purchasing your soul. Your time is the 
only real finite asset that you have, and once used it can never be 
recovered, so don't waste it by giving it away.

I work to live; I don't live to work.

"Time is the coin of your life. It is the only coin you have, and only you 
can determine how it will be spent. Be careful lest you let other people 
spend it for you." -- Carl Sandburg (1878 - 1967)

It is impossible to defeat an ignorant man in argument. -- William G. McAdoo

Religion is regarded by the common people as true, by the wise as false, and 
by the rulers as useful. -- Seneca

"I distrust those people who know so well what God wants them to do because 
I notice it always coincides with their own desires." - Susan B. Anthony




----Original Message Follows----

right .... if I:

    let $start_table = datetostr(datenow(), 'DD-MON-YYYY HH24:MI:SS')
    begin-select
    ...
    end-select
    let $end_table = datetostr(datenow(), 'DD-MON-YYYY HH24:MI:SS')
    let #elapsed_table = round(datediff(strtodate($end_table, 'DD-MON-YYYY 
HH24:MI:SS'),
                                 strtodate($start_table, 'DD-MON-YYYY 
HH24:MI:SS'), 'second'), 0)


then #elapsed_table contains the elapsed system time  ....  that is not what 
I want

I want the query execution CPU time .... I do not have access to the 
database logs .... is there no way I can get that information though my 
program?

Is there a way to set "something" on so that I can get a trace of the 
database log in my logsqr file?

I ultimately want to print that CPU time as part of my output report.

--wb

_________________________________________________________________
MSN is giving away a trip to Vegas to see Elton John.  Enter to win today. 
http://msnconcertcontest.com?icid-nceltontagline


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users