[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



Wendy
To get the overall run time of a report and print it on the report, I use
the following.
In the Setup section I put:
   DECLARE-VARIABLE
   Date $time_start
   END-DECLARE
In the Begin-Program section I put:
Begin-Program
   Let $time_start = datenow()
   Do Main 
   Let #time_diff1 = datediff(datenow(), $time_start, 'second')
   Let #time_diff = round(#time_diff1,2)  
End-Program

I report the time in seconds in the footer on the last page of the report.
Begin-Footing 2  
   Page-Number          (1,135) 'Page ' 
   Last-Page            () 'of '      
   If #time_diff > 0
      Print #time_diff     (2,117) Edit 999999 
   End-if
End-Footing

I hope this is helpful.

Dave Benzenhafer

-----Original Message-----
From: Wendy Biggs [mailto:wendy.biggs@vt.edu] 
Sent: Friday, April 06, 2007 12:51 PM
To: This list is for discussion about the SQR database reporting language
from Hyperion Solutions.
Cc: Steve Cavill
Subject: RE: [sqr-users] actual execution time for select to process

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


At 08:51 PM 4/5/2007, you wrote:
>Datenow() sqr function will retur the time.
>Why do you say "I can grab system time before & after the select 
>statement and find the difference"
>That's the elapsed time of the select.  If you want the query 
>execution CPU time you would need to look at the database logs.
>Steve.
>
>-----Original Message-----
>From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
>[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] 
>On Behalf Of Wendy Biggs
>Sent: Friday, 6 April 2007 6:59 AM
>To: sqr-users@sqrug.org
>Subject: [sqr-users] actual execution time for select to process
>
>I need to determine the actual execution time of several different 
>select statements.
>Has anyone else on this list done this?
>Is there an sqr variable that will get to that information?
>
>I can grab system time before & after the select statement and find 
>the difference ... but that is not the same as the actual time
>the statement took to execute.
>
>Any and all help will be appreciated.
>
><sigh>
>--wb
>
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org
>http://www.sqrug.org/mailman/listinfo/sqr-users
>
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org
>http://www.sqrug.org/mailman/listinfo/sqr-users





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