Hi Jim, Larry, Emmitt, Razzak and all
It looks the internal processing order is different in V8 compared to 7.5
Browse from the view is fast and Unload all did not make any difference
It appears I need to force RBase to sort the data in the same order as 7.5
This view is used to print this report using several Where statements.
So is there a way to do this on the Print Statement?
Thanks for the help
Marc
This is the Table order and Where clause in my VIew
FROM tran_hist t_1,ptinfo t_+
2,ptdiag t_3,ch_cod t_4,drinfo t_5,inscomp t_6 WHE+
RE (t_1.tr_type = '1') AND t_1.custnum = t_2.custn+
um AND t_1.custnum = t_3.custnum AND t_1.date_con +
= t_3.date_con AND t_1.ch_code = t_4.ch_code AND t+
_1.treat_dr = t_5.dr_num AND t_4.feesch = t_6.fee_+
sch
* there are only 2 rows in Drinfo
In 7.5 I get
R> prompt
05/07/2009 7:28 AM
SelectCost=20.53947 (OptimizationTime=0ms)
PTINFO (ColumnName=insco1,Type=F) VeryRandom Dup=11.83461 Adj=0.1472802
INSCOMP (ColumnName=COMPnum,Type=P) VeryRandom Dup=1 Adj=0.8371711
DRINFO Sequential
tran_hist (ColumnName=custnum,Type=I) VeryRandom Dup=61.73317 Adj=0.5723843
ch_cod (ColumnName=CH_CODE,Type=I) VeryRandom Dup=2.929204 Adj=0.336858
PTDIAG (ColumnName=date_con,Type=I) Random Dup=2.500381 Adj=0.9794695
8.0
C:\RBTI\RBG8\Samples\RRBYW14\tt 183
05/07/2009 7:17 AM
SelectCost=7.697846 (OptimizationTime=0ms)
PTINFO (ColumnName=insco1,Type=I) VeryRandom Dup=11.81472 Adj=0.4676692
INSCOMP (ColumnName=COMPnum,Type=P) VeryRandom Dup=1 Adj=0.8519737
tran_hist (ColumnName=custnum,Type=I) VeryRandom Dup=61.74523 Adj=0.6838978
DRINFO (ColumnName=Dr_num,Type=P) Random Dup=1 Adj=1
PTDIAG (ColumnName=date_con,Type=I) Random Dup=2.499111 Adj=0.9919748
ch_cod (ColumnName=CH_CODE,Type=I) VeryRandom Dup=2.929204 Adj=0.3655589
From: James Bentley
Sent: Wednesday, May 06, 2009 8:26 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: 7.5 vs V8 speed
Marc,
It looks like you need to understand how RBase syntax analyzer and the
Rbase optimizer is interpreting and processing your view statements. Try
issuing the following commands
SET DEBUG ON
SET VAR MICRORIM_EXPLAIN = 47
RETURN
*(MICRORIM_EXPLAIN
This variable shows the decision the optimizer made when executing a
particular command. The optimizer results are placed in the file
EXPLAIN.DAT. The DEBUG command must be on to use microrim_ explain.
The available options for microrim_ explain are
1 - output the table order.
2 - force optimization of joins over five tables. This option is
ignored if microrim_fullopt is set.
4 - output the command file name and next byte offset.
8 - output the current date and time.
32 - display the sort technique used.
To use multiple options, add the option numbers together and set the
variable to the result. For example:
SET VAR microrim_explain = (1 + 4 + 8)
SET VAR microrim_explain = 13
)
Then run your report.
Look at the Explain.dat file.
You may need to do this in both versions to see if RBase is interpreting
the views differently between versions.
Jim Bentley
Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293
--- On Wed, 5/6/09, MDRD <[email protected]> wrote:
From: MDRD <[email protected]>
Subject: [RBASE-L] - Re: 7.5 vs V8 speed
To: "RBASE-L Mailing List" <[email protected]>
Date: Wednesday, May 6, 2009, 5:03 PM
Unfortunately Project Temp from View then Printing the Report is not
much faster compared
to the original way.
Marc
It sounds like you should do the PROJECT TEMP ... command from your
view (include the WHERE clause in your PROJECT), base the report on the temp
table instead of the view.
Bill
On Tue, May 5, 2009 at 12:47 PM, A. Razzak Memon <[email protected]>
wrote:
At 10:25 AM 5/5/2009, Marc Schluter wrote:
The command below takes 2 times longer in V8 compared to the same
code in 7.5.
PRINT NewForm76D WHERE tr_date BETWEEN 1/1/09 AND .#date AND
insco1 = 7 AND compnum = insco1 ORDER BY insco1, custnum, tr_date
The report is based on a 6 tab view, Browse all from View using
the same where clause only takes 1/4 the time compared to the Print
statement. Leaving off the Order by does not make any difference.
I am using a copy of the same DB converted to V8, so all data,
reports and indexes are the same.
I did notice that the #1 file was 46 k now it is 191 k and the # 3
file is almost double the size in V8. Is that normal?
I am not sure what to look for next?
Marc,
In addition to all the good suggestions you have already received,
take a look at your report for "Pass Settings". If you are not
using the System Variables "Page Set with Description" option,
such as [Page nn of nn], or DBCalcs with "Look Ahead" option,
change the Report "Pass Setting" from "Two Pass" to "One Pass".
Here's how:
Report Designer | Main Menu | Report | Pass Settings
This will definitely speed up the PRINT engine.
Once you have made the suggested change, try the following
command to PRINT the report:
-- Example
-- Start here
PRINT NewForm76D WHERE Tr_Date BETWEEN 1/1/2009 AND .#DATE +
AND InsCo1 = 7 AND CompNum = Insco1 +
ORDER BY InsCo1, CustNum, Tr_Date +
OPTION SCREEN|WINDOW_STATE MAXIMIZED +
|ZOOM_TYPE PERCENTAGE +
|ZOOMPERCENT 98 +
|PREVIEW_CAPTION New Form 76D
RETURN
-- End here
Hope that helps!
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text
to search for.
================================================