[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] on-break Performance
Given the fact that this table is indexed, it may not matter, but you might
simplify the sort. Since there's only one value of COMPANY, PAYGROUP, and
PAY_END_DT, why sort on them? And, do you really care which PAGE_NUM,
LINE_NUM, and OFF_CYCLE values come first?
Or is there more to this program than we see? PS_PAY_LINE has some
interesting information, but I usually use it to link EMPLID to the rest of
the paycheck. Are you doing that? If so, select the other tables at the
same time; join PS_PAY_LINE with PS_PAY_EARNINGS or PS_PAY_DEDUCTION or
whatever. That's much, much faster than reading each row of PS_PAY_LINE and
then using the key fields to read one row of another table.
-----Original Message-----
From: Ray Ontko [mailto:rayo@ontko.com]
Sent: Sunday, October 05, 2003 6:23 PM
To: sqr-users@sqrug.org
Subject: Re: [sqr-users] on-break Performance
Roland,
I've never seen any performance problems caused by on-break.
It should be as fast or faster then putting in your own if-then
logic.
Ray
On Sun, Oct 05, 2003 at 12:59:27PM -0700, Roland Ferreras wrote:
> I have an SQR program that will be processing a lot on information and I'm
in need to tweak it as much as possible. My question is what's the overhead
performance of ON-BREAK commands when used in a BEGIN-SELECT block? I'm
thinking of rewriting the following code using 'if-then' logic to find my
breaks depending on the performance. I have around 5 BEGIN-SELECT
procedures that I would have to recode.
>
> Below is a copy of my code...
>
> begin-SELECT on-error = ESG-SQL-Error
> LINE.EMPLID () ON-BREAK level=1 save=$EMPLID
> LINE.COMPANY () ON-BREAK level=2 save=$COMPANY
> LINE.PAYGROUP () ON-BREAK level=3 save=$PAYGROUP
> LINE.PAY_END_DT () ON-BREAK level=4 save=$PAY_END_DT
> LINE.OFF_CYCLE () ON-BREAK level=5 save=$OFF_CYCLE
> to_char(LINE.PAGE_NBR) () ON-BREAK level=6 save=$PAGE_NBR
> to_char(LINE.LINE_NBR) () ON-BREAK level=7 save=$LINE_NBR
AFTER=Pay-Line-Break
> to_char(LINE.EMPL_TYPE) () ON-BREAK level=8 save=$EMPL_TYPE
>
> FROM PS_PAY_LINE LINE
> !-------------------------------------------
> WHERE LINE.COMPANY = $COMPANY
> AND LINE.PAYGROUP = $PAYGROUP
> AND LINE.PAY_END_DT = $PAY_END_DT
> AND LINE.CONFIRMED = 'Y'
> ORDER BY LINE.EMPLID
> ,LINE.COMPANY
> ,LINE.PAYGROUP
> ,LINE.PAY_END_DT
> ,LINE.OFF_CYCLE
> ,LINE.PAGE_NBR
> ,LINE.LINE_NBR
> end-SELECT
>
>
> FYI I'm running this in a Windows 2000/Oracle 9 shop.
>
> Thanks!
>
> Roland
>
>
>
>
>
> "If you are going through hell, keep going."
> - Sir Winston Churchill (1874-1965)
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
----------------------------------------------------------------------
Ray Ontko rayo@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
_______________________________________________
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