Focal Point
[SOLVED] What is the Max size of Focsort.foc

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

August 02, 2017, 10:09 AM
jgelona
[SOLVED] What is the Max size of Focsort.foc
The documentation says, "FOCSORT, allocated as FOCSORT.FOC, may be required for sorting with the TABLE, TABLEF, and MATCH commands. The maximum size of a FOCSORT file is 1G of 256K pages."

Is that 1 billion pages with each being 256K in size? Isn't that 256 TB?

The reason I ask is that I have a very large job that is going to load over 3.5 million rows into 2 tables (7 million rows total). When FOCSORT gets over 4GB the process slows to a crawl.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
August 02, 2017, 10:14 AM
BabakNYC
Is this question regarding FOCUS on MVS?


WebFOCUS 8206, Unix, Windows
August 02, 2017, 10:23 AM
jgelona
WebFOCUS on Linux


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
August 02, 2017, 10:45 AM
FP Mod Chuck
Hi Jgelona

2GB is the maximum size for focsort


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 02, 2017, 11:12 AM
jgelona
Chuck, if the limit is 2GB, then why does the file grow to over 5GB with no error or warning? Is FOCSORT a FOCUS file or XFOCUS file?

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
August 02, 2017, 12:27 PM
FP Mod Chuck
Hi Jgelona

I was wrong the 2GB limit is for a FOCUS database. I thought focsort was a focus database but not sure now. focsort does not appear to have a limitation unless you specifically set it. https://techsupport.informatio...om/sps/91192526.html


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 02, 2017, 12:45 PM
Danny-SRL
John,
You say that you are loading 3.5 Mrows into a table.
What type of table?
Are these rows in a sequential file? In another table?
If the table is SQL, shouldn't you try some type of bulk loading?
If the table is FOCUS, are your rows pre-sorted so that you can use TABLEF?
Many questions.


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

August 02, 2017, 01:16 PM
j.gross
FOCSORT (in pre-WebFOCUS days) was structured as a FOCUS database, with a single segment (one segment per verb for a multi-verb TABLE request). The TABLE request essentially generated a CREATE to initialize the structure, and a MODIFY to update its contents for each incoming transaction row.

If the documentation now speaks of a 256K "pagesize", it sounds like they've gone to something along the lines of XFOCUS as the internal structure, but still basically a database of one or more segments, with segment pages and segment instances connected by pointers.

Either way, there is overhead in fitting the data into a page structure (pointers; dead space depending on segment size), so the effective capacity would be somewhat less than the stated filesize limit.

If your rows are not normalized, you may be able to squeeze the data into less FOCSORT space by using multiple verbs. The effect is to store the sort keys and object columns of the first verb in the top segment, the additional keys and verb objects of the second verb in the second segment etc. And, to add to Danny's points, have your data source pre-sort the data, even if the TABLE FORMAT is not FOCUS/XFOCUS.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
August 02, 2017, 03:09 PM
jgelona
I believe the format is an XFOCUS file because one of my steps created a FOCSORT file of over 11GB. If it is an XFOCUS file, that would mean the size limit is around 16GB.

This data is being loaded into 2 Oracle tables but there is a lot of manipulation that has to take place before the data can be loaded. There are over 3.5 million rows in the input file with 17 text fields of varying length that have to get concatenated into a single text field. The 3.5 million rows are being reduced to 800K rows that will be inserted into the tables. The output from the manipulation process is a HOLD file that I do a -READFILE on and use SQL PASSTHRU to load.

What I found is that if there is an existing FOCSORT file in a single fex and once that FOCSORT file reaches about 4GB is size, the performance goes down the tubes for the following steps. I had to split my procedure into 7 procedures because just deleting FOCSORT at the appropriate time did not always work. This insures a fresh FOCSORT is created when necessary.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.