Focal Point
[CLOSED] Foc-file size

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

May 30, 2011, 10:30 AM
Wep5622
[CLOSED] Foc-file size
I may be mistaken, but it would appear that if you rewrite a foc-file (ON TABLE HOLD AS ... FORMAT FOCUS), that WebFOCUS won't reduce the size of the file if the data would fit in a smaller file, but keeps it at the original size instead. Of course it does grow if the file needs to store more data, or there would be trouble. I can see how this would be a performance optimisation once a report is in production.

However, sometimes we change our minds about how to distribute our data among foc-files, which does at times result in an expected file size reduction. Due to the (perceived) above optimisation, this of course does not happen.

Is there a way to trim down existing foc-files without having to re-create them from scratch? Something akin to vacuuming database tables?

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
May 30, 2011, 10:36 AM
GamP
There are at least two ways of trimming down the file size of focus files, but they all involve re-creating the file. First one is to do a rebuild dump, then delete the file, then do a rebuild load.
The other one is to table to a hold file, delete the focus file, followed by a reload with the use of modify or maintain.
There is no utility that I know of that will do a truncate of the file without at some point physically removing the 'old' data file.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 30, 2011, 12:32 PM
ABT
Something I have discovered recently too is, each one of these held files consumes space on the disk. That is, if you hold one file, sort it and hold it as a second name, there will be 2 equal sized files on the disk (assuming you didn't add WHERE criteria on the second file). So, it may make your processing more efficient or logical, but from a disk usage perspective, it is a bit worse.

IT = Tradeoffs

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
May 30, 2011, 06:34 PM
Waz
I think GamP's suggestion of REBUILD is the safest was to "compress" a FOCUS file.

You could even create an include fex that will handle the job for you, so its generic, and can be reused.

I may have done this at a customer site once.


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!

May 31, 2011, 05:57 AM
JohnO
If you are using ON TABLE HOLD FORMAT FOCUS, the file is considered temporary (and by design, should be temporary!). REBUILD would not be a performance enhancer for an 'on-the-fly' HOLD file... Rather just delete the foc file before the HOLD because it is emptied anyway.

If you are using MODIFY or MAINTAIN, then the REBUILD is your best bet.


WF 7.6.8, Windows
Any output format: HTML, Excel, PDF, XML, etc.
May 31, 2011, 09:29 PM
Jim Morrow
We load quite a few FOCUS DB in Batch jobs. (controlled by an AutoSys Scheduler). One approach is the to the Create and Load process in a work folder. We use one per batch job to keep the jobs isolated.

When the load is finished and cbalanced, the new file is moved to the "production" folder and made available for use.

The batch jobs do several TABLEs. The size of the FOCSORT increases. We have included a delete of FOCSORT between the job steps to keep it from growing to large. We only became aware of this problem when we moved to 7.6.10 from 7.6.4. But, it may have become noticeable because our available disk shrunk by 20 gig during the install process. Mad The server build team has since corrected their error.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



June 01, 2011, 08:31 AM
GamP
In older releases focsort never gave a problem because it was always rewritten with every new sort. In fact, this still should be the case. The positive side is that focsort now is 'unlimited' in size. So also for very large sorts and aggregations focsort can accomodate that amount of data.
Focsort will however, very much like a focus datafile - which it was in the old days, never be reduced in size automatically.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988