[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Efficiency Question
The $rr_sw is just a yes/no flag that I use to determine if a record is to be
processed through the remainder of the SQR logic.
The flag is initially set to 'N'.
If any of the conditions in the EVALUATE statement are met, it is set to 'Y'.
The final IF statement will cause the record to be processed if the flag is Y
Holger Noreke <holger@NOREKE.COM> on 11/09/2000 11:03:24 AM
Please respond to sqr-users@list.iex.net
To: SQR-USERS@list.iex.net
cc: (bcc: Rick Creel/IT/Aon Consulting)
Subject: Re: Efficiency Question
Rick,
What are the conditions for $rr_sw = 'N'? That may be an easier way to
formulate the query if the dataset is smaller...
-Holger
-----Original Message-----
From: Discussion of SQR, Brio Technology's database reporting
language [mailto:SQR-USERS@list.iex.net] On Behalf Of Rick_Creel@AONCONS.COM
Sent: Thursday, November 09, 2000 9:43 AM
To: SQR-USERS@list.iex.net
Subject: Efficiency Question
How efficient is an EVALUATE statement when processing large volumes of
data? I
did a rewrite on an old SQR that seemed to take too long to run; the
intention
was to improve overall run time & efficiency. I used the following code and
was
disappointed in the overall elapsed time. I know elapsed time is affected
by
many other factors & events happening in the system.... but thought I would
pose
the question to you folks anyway. Is there a better way to write this code?
Thanks for all your help!
My environment:
PSoft Ver 7.53
Oracle Ver 8.06 (Rule Based)
SQR Ver 4.34
My code:
let $rr_sw = 'N'
evaluate $proj_type
when = 'ABL'
if &pr.analysis_type = 'BLD' or &pr.analysis_type = 'CAS'
let $rr_sw = 'Y'
end-if
break
when = 'ACR'
if &pr.analysis_type = 'BLD'
if (&pr.resource_type = 'LABOR' or
&pr.resource_type = 'APPLY' or
&pr.resource_type = 'UNIT' or
&pr.resource_type = 'CRREB' or
&pr.resource_type = 'CRWDN' or
&pr.resource_type = 'PBILL' or
&pr.resource_type = 'REWIP' or
&pr.resource_type = 'WDN' or
&pr.resource_type = 'WUP')
let $rr_sw = 'Y'
end-if
end-if
break
when = 'EVT'
if &pr.analysis_type = 'BLD'
if (&pr.resource_type = 'MLSTN' or
&pr.resource_type = 'APPLY' or
&pr.resource_type = 'UNIT' or
&pr.resource_type = 'CRREB' or
&pr.resource_type = 'CRWDN' or
&pr.resource_type = 'PBILL' or
&pr.resource_type = 'REWIP' or
&pr.resource_type = 'WDN' or
&pr.resource_type = 'WUP')
let $rr_sw = 'Y'
end-if
end-if
break
when = 'UNT'
if &pr.analysis_type = 'BLD'
if (&pr.resource_type = 'APPLY' or
&pr.resource_type = 'UNIT' or
&pr.resource_type = 'CRREB' or
&pr.resource_type = 'CRWDN' or
&pr.resource_type = 'PBILL' or
&pr.resource_type = 'REWIP' or
&pr.resource_type = 'WDN' or
&pr.resource_type = 'WUP')
let $rr_sw = 'Y'
end-if
end-if
break
end-evaluate
if $rr_sw = 'Y'
do get_manager_info
end-if