Focal Point
[CLOSED] MORE vs USE. Which is more efficient?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7027076126

June 26, 2012, 12:30 PM
Mighty Max
[CLOSED] MORE vs USE. Which is more efficient?
For one of the reports I am working on I have to concatenate multiple data sources. These data sources can have millions of records within them. So my question is which is more efficient in concatenating MORE or USE? Also another otion I was suggested was FILEDEF (APPEND. But I am not sure if that is better than MORE or USE.

  
TABLE FILE CAR 
PRINT
COUNTRY 
DEALER_COST
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS HDATA FORMAT FOCUS
END
-RUN

TABLE FILE CAR 
PRINT
COUNTRY 
DEALER_COST
WHERE COUNTRY EQ 'JAPAN'
ON TABLE HOLD AS H2 FORMAT FOCUS
END
-RUN

-* Using MORE
TABLE FILE HDATA
PRINT
COUNTRY
DEALER_COST
ON TABLE HOLD AS HDATA
MORE
FILE H2
END
-RUN

-*-* Using USE
-*USE
-*HDATA AS HDATA
-*H2    AS HDATA
-*END
-*-RUN

TABLE FILE HDATA
PRINT
COUNTRY
DEALER_COST
END
-RUN

This message has been edited. Last edited by: Mighty Max,


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
June 26, 2012, 12:41 PM
rfbowley
Max, the answer to your question is..... yes.

There are so many variable involved here that there will never be one final answer that applies to all databases, all operating systems, all configurations of reporting servers etc. etc.

My suggestion to you is to coordinate with your DBA(s) and try both techniques. Then you will have the correct answer for your installation.

I have been at about a dozen different clients over the years, and I have used both techniques, although never both at one place Wink


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
June 26, 2012, 05:35 PM
Waz
If you are taking about millions of rows, then I would suggest FILEDEF APPEND, and use TABLEF, but then you will have a concatenated file that is not sorted. All depends on what you are doing with the results.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 27, 2012, 12:45 AM
Danny-SRL
If you have "millions" of records AND you are on Windows (and not Unix or a Mainframe), then I would not use APPEND.
I have done that and experienced terrible degradation of response time. What I found out is that when you use APPEND, new data is not added to the file but a new file is created onto which WebFOCUS first copies the old file before adding the the records from the new extraction. When I had to do this, I created many different files and then used:
!COPY FILE1+FILE2+...+FILEn FILELAST

Secondly, if you have "millions" of records, do not create intermediate FOCUS files: you are in fact creating a sequential file then loading it into a FOCUS file, thus reading and writing all your records twice.

Specifically, what is the structure of your original files? FOCUS? Sequential? SQL? Other?
Start with that, and see what is the result you want to achieve.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF