Table E and non-FILEORG X'100' files (File architecture)

From m204wiki
Revision as of 22:01, 14 March 2013 by Rob (talk | contribs) (Created page with "Holds Large Object Data (BLOBs and CLOBs) Enabled by reorganizing / CREATEing a file with ESIZE greater than 0, and then [[DEF...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Holds Large Object Data (BLOBs and CLOBs)


Enabled by reorganizing / CREATEing a file with ESIZE greater than 0, and then defining a field with a datatype of CLOB or BLOB (the file must have an ESIZE for the latter to occur).

Available as of Model 204 V7.1


Summary

Storage and manipulation of Large Objects (LOBs):

Table E under non FILEORG x'100' files remains a good choice for static stores of Large Objects (scanned forms, for example). If it is expected that there will be large numbers of adds, changes and deletes, strong consideration should be given to Table E with FILEORG x'100'.


Space Utilization

Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data.

A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages.
Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.
Large Object data of 6145 bytes requires two Table E pages.


Storing a Large Object

The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored (and you must if you wish the object to expand in size after its initial store), then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.

If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG—even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data.

Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.

If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you use FILEORG x'100'files.


The following Parameters and Commands relate to the Use of Table E

COMPACTE command Defragment the contents of Table E
EHIGHPG parameter The highest active Table E page. (The first page in Table E is page zero.)
EPGSUSED parameter The number of Table E pages currently in use.
ESIZE parameter The number of pages in Table E
FILEORG parameter The file organisation

whose use is discussed in Table E (File Management)