Fujitsu UDS/SQL V2.5 Manuel D’Utilisation

Page de 324
REORGANIZATION clause
SSL
172
  
 U929-J-Z125-9-76
5.5 Defining the extent of table reorganization desired 
DYNAMIC REORGANIZATION SPANS integer PAGES
If, when records are stored, the storage space requirements are formed to exceed those 
initially calculated on the basis of the POPULATION clause, UDS/SQL automatically 
performs a table extension. A table that is not quite the size of a page but that cannot be 
extended by at least two table lines within its page is continued in a further page by 
UDS/SQL. If a table spans several pages, however, and the part to be extended requires 
an entire page, UDS/SQL can search a certain number of the pages containing the logically 
adjacent parts of the table for free space. 
integer
 denotes the number of table pages to be searched. In the case of pointer arrays, lists, 
sort key tables and set SEARCH key tables, this specification only takes effect if the set has 
not been defined with ORDER IS LAST/FIRST. 
The pages to be searched are, at the same time, the pages submitted to UDS/SQL for 
dynamic reorganization. 
If UDS/SQL finds free space for a new table entry within these pages, this space is 
relocated to the place where the table entry is to be inserted. 
If, however, all pages searched are completely filled with table entries, UDS/SQL extends 
the table by one empty page after the searched pages. Further reorganization depends on 
the place at which the table entry is inserted. 
1. The table entry is to be inserted in the table but not at the beginning or at the end:
UDS/SQL evenly distributes the contents of the searched pages and the new table entry 
over the storage space which has been extended by one page. 
2. The table entry is to be appended at the end of the table. The new page contains the 
last table entry and the new table entry. 
3. The table entry is to be inserted at the beginning of the table: UDS/SQL moves the 
contents of the first table page, with the exception of the first entry, to the new page. The 
table entry to be inserted is stored in the first page. 
By this method, a high occupancy level is achieved for the table pages. In cases 2) and 3), 
the occupancy level is obtained using the following formula: 
                      n-1
Occupancy level [%] = 
LRLRLR x 100
                       n
where 
n
 is the maximum number of table entries per page.