[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Efficiency Question
Thanks to one and all for your suggestions. Once again... this group is the
GREATEST !!!
For those who care, I combined a couple of suggestions that were offered and
here is the result:
move 0 to #rr_sw
if ($proj_type = 'ABL') and
(&pr.analysis_type = 'BLD' or &pr.analysis_type = 'CAS')
move 1 to #rr_sw
else
if &pr.analysis_type = 'BLD'
evaluate $proj_type
when = 'ACR'
let #rr_sw = instr('LABOR APPLY UNIT CRREB CRWDN PBILL REWIP WDN
WUP', &pr.resource_type, 1)
break
when = 'EVT'
let #rr_sw = instr('MLSTN APPLY UNIT CRREB CRWDN PBILL REWIP WDN
WUP', &pr.resource_type, 1)
break
when = 'UNT'
let #rr_sw = instr('APPLY UNIT CRREB CRWDN PBILL REWIP WDN WUP',
&pr.resource_type, 1)
break
end-evaluate
end-if
end-if
if #rr_sw > 0
do get_manager_info
end-if
_______________________________________________________________________
Date: Thu, 9 Nov 2000 09:43:16 -0500
From: Rick_Creel@AONCONS.COM
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