Chapter 17 DMR Restructure DMR Restructure 629 DMR Purpose: The DMR utility can be used to restructure databases, changing the definition of a database object (such as a record or an index) when the change means that the object’s storage structure must be altered. Depending on the ACTION chosen, the DMR utility can be used to determine the amount of space that can be freed by defragmenting a file create a file from compressing a file containing only indexes create indexes that are dropped free space by defragmenting a file drop indexes that have been created verify file integrity by checking file page generation numbers for file damage show the status of indexes verify the integrity of indexes. You will have to modify the structure before applying the change. DMR manipulates the Record Databases directly to make these changes. For additional loading information and techniques, see “Indexing and Loading Large Amounts of Data.” For information about using disk space efficiently when you run DMR, see “Utilities Reference.” Operating Systems: All. 630 DMR Restructure Syntax: Windows, UNIX, VMS DMR UID=id UPW=pw DB=database ACTION=CHECKSPACE | COMPRESS | CREATE | DEFRAG | DROP | MISMATCH | SHOW | VERIFY_INDEX INDEX=index{FILEs=dfl} {INPUT=infile} {NEWFILE=newfile} {OLDFILE=oldfile} {OUTPUT=outfile} {PAD=0:500} {STATS=NO | YES} {TRACE=BRIEF | FULL | NONE} {VERSION=0:99 | *} {VF=vocfile} Note: The default for TRACE is BRIEF for ACTION=CREATE and is NONE for ACTION=SHOW. Parameters: For instructions about entering parameters on various operating systems, see Tables 1-1 and 11-1. You can use the DMR utility to perform a variety of tasks which you specify through the ACTION parameter. The action you specify determines which additional DMR parameters you must or may use. No matter which action you select, there are three parameters in addition to ACTION that you must specify—DB, UID, and UPW—and three that you may specify—INPUT, OUTPUT, and VF. All other DMR parameters are linked to specific actions and/or operating systems. Table 17-1 summarizes these dependencies and conditions: DMR Restructure 631 Table 17-1: DMR actions and parameters If you specify ACTION= You must also use these parameters (Required) You may also use these parameters (Optional) (any action) DB, UID, UPW INPUT, OUTPUT, VF CHECKSPACE FILES VERSION COMPRESS NEWFILE, OLDFILE PAD CREATE INDEX PAD, STATS, TRACE, VERSION DEFRAG FILES VERSION DROP INDEX VERSION MISMATCH FILES VERSION SHOW INDEX TRACE, VERSION VERIFY_INDEX INDEX VERSION Required Parameters: Four of the following parameters—ACTION, DB, UID, and UPW—must be specified no matter which action of DMR you wish to use. The other parameters—FILES, INDEX, NEWFILE, and OLDFILE—are also required but only for specific actions, as indicated. The parameters are listed alphabetically. 632 DMR Restructure ACTION=CHECKSPACE | COMPRESS | CREATE | DEFRAG | DROP | MISMATCH | SHOW | VERIFY_INDEX (Required) The ACTION parameter indicates what task the DMR utility is to be used for. CHECKSPACE Checks the amount of fragmentation in a file and determines how much space can be freed by defragmenting the file. The database should be in readonly mode, or access to it should be EXCLUSIVE. COMPRESS Reads a file containing only indexes and creates a new file. Padding is eliminated (overridden by the PAD parameter). DMR with ACTION=COMPRESS is the best tool for measuring the amount of padding in an index. This action will compress an index to its most dense form (assuming the PAD parameter is 0). Run this utility and compare the file size of the compressed file with the file size of the uncompressed file. When considering a change to INSERT_METHOD for an index, remember to consider changes to all the indexes located in the compressed file. When DMR compresses an index, by default it will compress the index to its most dense form (padding=0). You would only want to use a padding of 0 if you plan to make very few additional updates (adds or replaces) to the index. Since padding units are specified in computer words, choosing a padding value is dependent upon the number of words in an index node on that machine. Windows use 1020-word nodes. UNIX and VMS use 508-word index nodes. All systems use 32-bit words. DMR Restructure 633 Padding methods for UNIX and VMS are as follows: Padding % padding Equivalent Insert Method 0 0 Sequential 50 10 (no equivalent insert method) 127 25 Mostly Sequential 254 50 Random For Windows, double the padding in the table to achieve comparable percents. CREATE Creates indexes that are dropped. Indexes are created by extracting the terms from all of the record occurrences and then building the index tree. DMR needs EXCLUSIVE access to the files containing the records to be processed and their indexes. DMR creates only dropped indexes. For more information about dropped indexes, see the topic “Actions Pertaining to Indexes” below. DEFRAG Frees space by defragmenting a file. The size of the file will not change, but fragments of free space are collected for subsequent reuse. Requires EXCLUSIVE access to the database. DROP Drops indexes that have been created. DMR needs EXCLUSIVE access to the files containing the indexes to be processed. You can drop a “dropped” index to ensure that the status in the Definition Database agrees with the status in the Record Database. Dropping an index involves several steps: (1) dropping the index by DMR ACTION=DROP, (2) deleting the stand-alone index file (delete this file by DMDBA, not by your operating system’s delete command), (3) initializing the index file by DMDBA, and (4) creating the index by DMR ACTION=CREATE. 634 DMR Restructure MISMATCH Verifies file integrity by checking file page generation numbers. The database should be in read-only mode, or access to it should be EXCLUSIVE. Page generation numbers exist as the first and last word on every page of every database file. They should always match and thus confirm that the page was successfully written to disk. Mismatches usually indicate that an I/O failure has occurred at some point in the past. This failure is usually the result of the operating system or I/O subsystem not informing BASIS of an unsuccessful I/O operation. This is not a normal condition and indicates a critical problem in your environment. If page generation mismatches occur, the only alternatives are to restore a good version of the database and replay journals or to dump and reload the database. SHOW Shows the status and, optionally, the structure of indexes and partitions of partitioned indexes. Analyzes the structure of index term and reference trees and prints information useful in determining the tuning of index padding, insert methods, and settings for the environment variable HVU_MRG_SPLIT. The TRACE parameter is used to control this processing. Lists versions that have the specified indexes. VERIFY_INDEX Verifies the integrity of indexes. The database is accessed in read-only mode, and pertinent datastructures involving indexes are checked for damage. The following steps are executed to detect index corruption: 1. Term b-trees are checked to see if all node pointers point at correct nodes. 2. Ascending order of terms is verified within a node and among sequential nodes. DMR Restructure 635 3. Reference b-trees are checked for non-unique index terms which have more than one reference. 4. Record pointers associated with index terms are verified by reading the records from the database. 5. Reference details associated with index terms are verified by extracting the fields from the records and matching them with the terms. Damage to indexes can be caused by hardware or software failure. If a damaged index is detected, you will have to drop and re-create it. For more information about data structures involving indexes and about the structure of indexes, see “DBMS Architecture.” Note: If you have performed a series of backups and restores, the index status in the Definition Database may not actually reflect the contents of the Record Database. DB=database (Required) See Table 11-2. FILEs=dfl (For ACTION=CHECKSPACE, DEFRAG, or MISMATCH only, Required) Data file(s) to be checked or defragmented, where: Note: 636 DMR Restructure dfl := df | (df{,df}0:63) | * | ALL | TDB df := dfn | DDB | dfn:dfn dfn := integer (data file number 1:63) TDB must be specified for a thesaurus database. INDEX=index (For ACTION=CREATE, DROP, SHOW, or VERIFY_INDEX only; Required) INDEX is used to identify the record and index_name using the follow conventions. index := record.index_name record := record_name | * (* means all records) index_name := identifier | * | identifier#partition_nr where 1. identifier is the index name. 2. * means all non-unique fields that have dropped indexes if ACTION=CREATE; and all non-unique indexes if ACTION=DROP, SHOW or VERIFY_INDEX. 3. identifier#partition_nr where identifier is the index name, # is the partition tag, and partition_nr is the partition number. The partition number is based on the partition sequence in the index statement. The following index statement has three (3) partitions: #1, ‘DZZZZZ’=DOC_INDX2; #2, ‘NZZZZZ’=DOC_INDX3; #3, ALL_OTHER_TERMS= DOC_INDX4 INDEX=ARTICLE.TEXT/TEXT_SCS,+ AREAS=('DZZZZZ'=DOC_INDX2,+ 'NZZZZZ'=DOC_INDX3,+ ALL_OTHER_TERMS=DOC_INDX4),+ TERMS=(INDEX_NULLS=NO,SINGULAR= YES,INSERT_METHOD=RANDOM,SIZE=1 :250),REFERENCES=(INSERT_METHOD =RANDOM,PROXIMITY=WORD),TYPE=IN CLUSIVE; INDEX=ARTICLE.TEXT#2 identifies the second partition in the TEXT field index, i.e., ‘NZZZZZ’=DOC_INDX3. The following index partition identifier DMR Restructure 637 formats are not supported: record_name.identifier#0 record_name.*#partition_nr record_name #partition_nr where the partition number is greater than the actual number of index partitions. record_name := identifier INDEX=index is used with the following actions: CREATE Specifies index(es) to be created. The form *.index_name is not supported. To create an index for a unique field or a section name field, the form record_name.index_name must be used. For partitioned indexes, record_name.index_name#0 is not supported, nor is using a partition number greater than the number of partitions defined for the index. DROP Specifies index(es) to be dropped. The form *.index_name is not supported. To drop a unique index or a section name field, the form record_name.index_name must be used. If INDEX_STRUCTURE=INDIRECT, you cannot drop the index for the primary key field. For partitioned indexes, record_name.index_name#0 is not supported, nor is using a partition number greater than the number of partitions defined for the index. 638 DMR Restructure SHOW Specifies index(es) to be displayed. The form *.index_name is not supported. To show the status of a unique index, the form record_name.index_name must be used. For partitioned indexes, record_name.index_name#0 is not supported, nor is using a partition number greater than the number of partitions defined for the index. VERIFY_INDEX Specifies index(es) to be verified. The form *.index_name is not supported. Unique indexes are verified when the record_name.* is specified. For partitioned indexes, record_name.index_name#0 is not supported, nor is using a partition number greater than the number of partitions defined for the index. NEWFILE=newfile (For ACTION=COMPRESS only, Required) Specifies the compressed file. OLDFILE=oldfile (For ACTION=COMPRESS only, Required) Specifies the file to be compressed. DMR will not process the file if it contains records. For OLDFILE specify the filename for the area that the index is in. Create a new filename for NEWFILE. After doing so, rename your original index(OLDFILE) and move the new index(NEWFILE) in its place. If you would prefer, you could go into DMDBA and revise the area to point to the new file. To do all of this, you must have everyone out of the database and have exclusive (EXCL) access. UID=id (Required) See Table 11-2. UPW=pw (Required) DMR Restructure 639 See Table 11-2. Optional Parameters: INPUT=infile (Optional) See Tables 11-2 and 11-3. OUTPUT=outfile (Optional) See Tables 11-2 and 11-3. PAD=0:500 (For ACTION=CREATE or COMPRESS only, Optional) Padding (in references) to be used in the reference trees. If most terms have very few references or you do not expect to change the database greatly, you should specify a low value. If terms have many references or you think you will be updating the database frequently, specify a higher value. You would only want to use a padding of 0 if you plan to make very few additional updates (adds or replaces) to the index. The default is 0. 640 DMR Restructure STATS=NO | YES (For ACTION=CREATE only, Optional) Determines whether to display run-time statistics. NO Run time statistics are not displayed. YES Run time statistics, such as elapsed run time and CPU time, are displayed. The terms statistic is the number of terms produced from the records. Stopwords and duplicates processing may reduce the number of terms actually put in the index. The default is NO. TRACE=BRIEF | FULL | NONE CREATE (For ACTION=CREATE or SHOW only, Optional) Determines the extent of trace information to be displayed. The default is BRIEF. BRIEF A message and timestamp are displayed at the start of each phase of DMR. The number of index terms produced and the number of records processed are displayed. FULL A message and timestamp are displayed at the start of each phase of DMR, after every 2000 records are read, before and after each sort, and after every 10,000 keys are processed during the index update phase. The number of index terms produced and the number of records processed are displayed. NONE No trace messages are displayed. DMR Restructure 641 SHOW Determines the extent of trace information about the index structure to be displayed. The default is NONE. BRIEF Statistics are displayed on index term sizes, index term tree depth and index term node free space. A significant amount of additional processing is required for TRACE=BRIEF than for TRACE=NONE since each index term tree is visited. FULL Additional statistics on index reference sizes, index reference depth. A significant amount of additional processing is required for TRACE=FULL than for TRACE=BRIEF since each reference tree of each index term is visited in the index. NONE No trace information is displayed. VERSION=0:99 | * (Optional) The version of the database to be used. Specifying an asterisk (*) uses all versions, existing or not. You may not specify an asterisk with ACTION=CREATE or COMPRESS. The default is 0. Note: This parameter is used for ACTION=CHECKSPACE, CREATE, DEFRAG, DROP, MISMATCH, or SHOW only. CREATE If multiple versions of the database exist and you want to create an index, you must use VERSION=0 with the CREATE action, even if the other versions are not initialized. DROP If multiple versions of the database exist and you want to drop an index, you must use VERSION=0 with the DROP action, even if the other versions are not initialized. 642 DMR Restructure VF=vocfile (Optional) See Tables 11-2 and 11-3. Key Points: If you find that you are running out of disk space when running DMR, see “Utilities Reference.” DMR requires read access to files. Effective with version 10.3, multiple invocations of DMR ACTION=CREATE, DROP and VERIFY_INDEX can run concurrently on database indexes as long as the indexes do not reside in the same database files. Any index file being updated is opened with exclusive write access. DMR opens only database files needed to complete the action; database files needed solely for read access are opened with shared-read mode thereby allowing other DMR processes to read the same database file. DMR sort input and output files include the DMR process ID as part of the file names so that multiple DMR invocations can share the same work directory. The ability to DROP, CREATE, SHOW and VERIFY_INDEX by partition number of partitioned indexes was implemented with version 10.3. Databases created under versions 10, 10.1 and 10.2 must be upgraded to allow DMR DROP, CREATE or VERIFY_INDEX on a partitioned index. Use DMDBA Administrative Task, ‘Recreate DDB system records’ and APPLY change order to complete the upgrade. Once this action has been taken, the database can not be used under a release prior to 10.3 because attempting to use DMR to create a partitioned index will cause unrecoverable damage to the database file. There are no restrictions on the order in which partitions in a partitioned index are created or dropped. Actions Pertaining to Indexes: You can use DMDBA to define non-unique indexes at any time during a database’s life span. A dropped index is an index that has been defined but is not currently active for a database. When non-unique indexes are defined and applied, they are in a “created” state or “dropped” state, depending on the presence of record occurrences for the field: The index is created, or active, if no record occurrences are in the Record Database. The index is modified as record occurrences are added to the database. The index is dropped, or inactive, when it is defined and applied and there are record occurrences present in the Record Database. The index will not be modified and cannot be used until you run DMR to create the index. DMR Restructure 643 If you have used versions, then the above rules apply to all versions, whether they actually exist or not. If any version has record occurrences, the index is dropped for all versions. You should run DMR against all versions when you are creating or dropping indexes. Also use DMR to create all the indexes when you are creating a new version, to ensure the indexes are updated as new occurrences are added. The status of the indexes can become incorrect if you have had to restore a backup copy of the Definition Database or the Record Database. The actual status is kept in the Definition Database. You should always backup the Definition Database and Record Database after a restructure. If you are not sure about the index status, DROP and then CREATE the index. A hardware or software failure can corrupt indexes. Updating a corrupted database may make it harder for you to restore a good version of the database. The ramifications can be serious if the damage goes undetected for long periods of time. Therefore, it is advisable to VERIFY indexes regularly to maintain a reliable database. 644 DMR Restructure Examples: 1. Run DMR using the default parameters. DMR . . . USER ID > id USER PW > pw DATABASE > TOUR ACTION > SHOW INDEX> EMPLOYEE.* Record EMPLOYEE Index Index Created in Versions --------- ------- -- -------EMPLOYEE.DNO All versions EMPLOYEE.JOB All versions EMPLOYEE.MGR_NO All versions EMPLOYEE.NAME All versions EMPLOYEE.SALARY All versions NORMAL TERMINATION - DMR VMS 2. Run DMR, hiding your UID and UPW. a. If you execute DMR from a proc that will always be submitted to the batch queue, you can put your UID and UPW immediately after the line in the proc invoking DMR. $ CREATE DMR.COM $ DMR ACTION=CREATE,INDEX=*.*,DB=TOUR id password [CTRL]/[Z] You can exclusively protect the file with the following statement: $ SET PROTECTION=(OWNER:RWED,GROUP,WORLD) DMR.COM Executing the job in batch creates a log file that will not contain the UID or UPW. DMR Restructure 645 b. A method that works in batch mode as well as in interactive mode is to specify an input file to DMR. $ CREATE UID.DAT id password [CTRL]/[Z] The following statement protects the file exclusively. $ SET PROTECTION=(OWNER:RWED,GROUP,WORLD) UID.DAT Then, when you invoke DMR, specify INPUT=UID.DAT. 3. Populate a database. DMR is run first to drop all of the non-unique indexes. Then the user program POPTOUR is run to populate the TOUR Database. DMR is run again to create all of the non-unique indexes. dmr UID=id UPW=pw DB=TOUR . . NORMAL TERMINATION - DMR poptour dmr UID=id UPW=pw DB=TOUR . . NORMAL TERMINATION - DMR ACTION=DROP INDEX=*.* . ACTION=CREATE INDEX=*.* . DMR sorts index terms before building indexes, then builds the indexes one at a time. If you load the database with HVU, however, you should not drop and create the indexes; instead, let HVU build them. Note: If any of the dropped indexes are involved in referential integrity constraints, a. the index must be created before running the population program so the constraints can be checked, b. you must specify CHECKREF=NO on the OPEN command in the population program to avoid referential integrity checking. If you do this, you should be sure to run DMSACK afterwards, to make sure the constraints were not violated. or 646 DMR Restructure 4. Depopulate a record definition. First run DMR to drop all non-unique indexes. Then run FQM to delete all of the record occurrences. DMR UID=id UPW=pw DB=TOUR ACTION=DROP INDEX=PROJECT.* . . . NORMAL TERMINATION - DMR FQM UID=id UPW=pw DB=TOUR.ALL AIDS=NO . . . FQM> START EXCLUSIVE=PROJECT FQM> FIND PROJECT FQM> DELETE [0,*]PROJECT FQM> FINISH FQM> EXIT NORMAL TERMINATION - FQM 5. Drop an index so that its definition can be deleted using DMDBA. DMR UID=id UPW=pw DB=TOUR ACTION=DROP + INDEX=EMPLOYEE.JOB . . . Jul 12, 1989 11:35:03 Processing record EMPLOYEE Jul 12, 1989 11:35:04 Finished processing EMPLOYEE Jul 12, 1989 11:35:05 Files marked usable and + reactivated NORMAL TERMINATION DMR DMR UID=id,UPW=pw DB=TOUR ACTION=SHOW + INDEX=EMPLOYEE.* . . . Record EMPLOYEE Index ----- Index Created in Versions ----- ------- -- -------- EMPLOYEE.DNO All versions EMPLOYEE.JOB Not created for specified version EMPLOYEE.MGR_NO All versions EMPLOYEE.NAME All versions EMPLOYEE.SALARY All versions NORMAL TERMINATION - DMR DMR Restructure 647 6. Check page generation number mismatches for all files of a database. DMR UID=id UPW=pw DB=TOUR ACTION=MISMATCH FILE=* . . . Processing file TOUR RDB File 1 Name Processing file TOUR RDB File 2 Name Processing file TOUR DDB File Name NORMAL TERMINATION - DMR The check of page generation numbers completed normally. If an error had occurred, a character and hex dump of the bad page would have occurred. 7. Check page generation number mismatches for a thesaurus database. DMR UID=id UPW=pw DB=TTOUR ACTION=MISMATCH FILE=TDB . . . Processing file TTOUR Thesaurus Database File Name NORMAL TERMINATION - DMR 8. Check available space for a file. DMR UID=id UPW=pw DB=TOUR ACTION=CHECKSPACE FILE=1 . . . Processing file TOUR RDB File 1 Name Pages Processed: Deleted Records: Available Words: 2312 807 525 Pages Pages Pages Pages Pages Pages Pages 2225 87 0 0 0 0 0 with with with with with with with 0 words freeable: 1:100 words freeable: 101:200 words freeable: 201:300 words freeable: 301:400 words freeable: 401:509 words freeable: 510 words freeable: Pages with 0 words available: Pages with 1:100 words available: Pages with 101:200 words available: Pages with 201:300 words available: Pages with 301:400 words available: Pages with 401:509 words available: Pages with 510 words available: NORMAL TERMINATION - DMR 648 DMR Restructure 1122 885 231 10 4 5 55 Meanings: 9. Pages Processed Total number of pages processed. Uninitialized pages in fixed areas are not processed. Deleted Records Number of deleted record headers that could be erased. Available Words Number of words that can be freed. Pages freeable Amounts of space that could be reclaimed from the pages processed. 510 is the largest record size on the UNIX and VMS platforms, and 1022 is the largest record size on Windows platforms. Pages available Amount of free space that would exist if the file would be processed with ACTION=DEFRAG. On the UNIX and VMS platforms, 510 means the page would be empty. On Windows platforms, 1022 means the page would be empty. Defragment a Definition Database file. DMR UID=id UPW=pw DB=TOUR ACTION=DEFRAG FILE=DDB . . . Processing file TOUR DDB File Name Pages Processed: Records Freed: Words Freed: Pages Pages Pages Pages Pages Pages Pages with with with with with with with 0 words freed: 1:100 words freed: 101:200 words freed: 201:300 words freed: 301:400 words freed: 401:509 words freed: 510 words freed: Pages with 0 words available: Pages with 1:100 words available: Pages with 101:200 words available: Pages with 201:300 words available: Pages with 301:400 words available: Pages with 401:509 words available: Pages with 510 words available: NORMAL TERMINATION - DMR 589 638 1502 361 228 0 0 0 0 0 294 151 13 5 9 4 113 DMR Restructure 649 The processing can be verified by running ACTION=CHECKSPACE: DMR UID=id UPW=pw DB=TOUR ACTION=CHECKSPACE FILE=DDB . . . Processing file TOUR DDB File Name Pages Processed: Deleted Records: Available Words: 589 0 0 Pages Pages Pages Pages Pages Pages Pages 589 0 0 0 0 0 0 with with with with with with with 0 words freeable: 1:100 words freeable: 101:200 words freeable: 201:300 words freeable: 301:400 words freeable: 401:509 words freeable: 510 words freeable: Pages with 0 words available: Pages with 1:100 words available: Pages with 101:200 words available: Pages with 201:300 words available: Pages with 301:400 words available: Pages with 401:509 words available: Pages with 510 words available: NORMAL TERMINATION - DMR 294 151 13 5 9 4 113 Note that all deleted records are gone and there are no pages with any space freeable. 650 DMR Restructure 10. Show statistics for an index with TRACE=BRIEF. DMR UID=id UPW=pw DB=TOUR ACTION=SHOW TRACE=BRIEF INDEX> CLIENT.CO Record CLIENT Index ----- Index Created in Versions ------------------------- CLIENT.CO All versions Processing the index in file file_spec Statistics for the above index Mar 09, 1994 11:33:25 Term Statistics for the above index Depth Total Depth of Term Tree: 1 Levels Nodes Average Term Node Size: 2032 Total Number of Nodes: 1 Number of Level 0 Nodes: 1 Bytes Nodes Nodes Terms Total Number of Terms: Average Term Size: Median Term Size: Minimum Term Size: Maximum Term Size: 63 8 8 1 22 Terms Bytes Bytes Bytes Bytes Terms Free Space Total Free Space: Average Free Space: Median Free Space: Minimum Free Space: Maximum Free Space: 192 192 192 192 19 Bytes Bytes Bytes Bytes Bytes per Node per Node in 1 Nodes in 1 Nodes DMR Restructure 651 11. Show statistics for an index with TRACE=FULL. DMR ACTION=SHOW TRACE=FULL UID=id UPW=pw DB=TOUR INDEX> CLIENT.CO Record CLIENT Index ----- Index Created in Versions ------------------------- CLIENT.CO All versions Processing the index in file file_spec Statistics for the above index Mar 09, 1994 11:33:25 Term Statistics for the above index Depth Total Depth of Term Tree: 1 Nodes Average Term Node Size: Total Number of Nodes: Number of Level 0 Nodes: 2032 1 1 Bytes Nodes Nodes 63 8 8 1 22 Terms Bytes Bytes Bytes Bytes 192 192 192 192 192 Bytes Bytes Bytes Bytes Bytes Terms Total Number of Terms: Average Term Size: Median Term Size: Minimum Term Size: Maximum Term Size: Terms Free Space Total Free Space: Average Free Space: Median Free Space: Minimum Free Space: Maximum Free Space: 652 DMR Restructure Levels per Node per Node in 1 Nodes in 1 Nodes Reference Statistics for the above index Depth Average Depth of Reference Trees: Median Depth of Reference Trees: Minimum Depth of Reference Trees Maximum Depth of Reference Trees: 1 1 1 1 Levels Levels Levels Levels Nodes Average Reference Node Size: Total Number of Nodes: Number of Level 0 Nodes: 500 56 56 Bytes Nodes Nodes Reference Reference Size: Total Number of References: 8 143 Bytes References Reference Free Space Total Free Space: Average Free Space: Median Free Space: Minimum Free Space: Maximum Free Space: Bytes Bytes Bytes Bytes Bytes 25792 460 464 368 464 per Node per Node in 1 Nodes in 51 Nodes 12. Verify the integrity of indexes. DMR ACTION=VERIFY_INDEX UID=id UPW=pw DB=TOUR INDEX=PLACE.* Record PLACE Index ----- Index Created in Versions ------------------------- PLACE.LOCATION 0 Aug 28, 1996 10:45:26 PLACE.LOCATION Index verification complete for PLACE.OVERVIEW 0 Aug 28, 1996 10:45:27 Verifying level 0 of the index. Aug 28, 1996 10:45:28 21 nodes processed at this level. Aug 28, 1996 10:45:28 Sorting index terms Aug 28, 1996 10:45:30 Verifying index terms Aug 28, 1996 10:45:30 Index verification complete for PLACE.OVERVIEW DMR Restructure 653 PLACE.TEXT Aug 28, 1996 Aug 28, 1996 Aug 28, 1996 Aug 28, 1996 Aug 28, 1996 Aug 28, 1996 Aug 28, 1996 PLACE.TEXT 0 10:45:31 Verifying level 1 of the index. 10:45:31 7 nodes processed at this level. 10:45:31 Verifying level 0 of the index. 10:45:49 438 nodes processed at this level. 10:45:49 Sorting index terms 10:46:11 Verifying index terms 10:47:10 Index verification complete for PLACE.TOPIC Aug 28, 1996 10:47:10 Aug 28, 1996 10:47:10 Aug 28, 1996 10:47:10 PLACE.TOPIC NORMAL TERMINATION – DMR 654 DMR Restructure 0 Sorting index terms Verifying index terms Index verification complete for Examples – Partitioned Indexes: The following partitioned index definition is use in the examples below. The partition number is based on the partition sequence in the index statement. The following statement has three (3) partitions: #1, ‘DZZZZZ’=DOC_INDX2; #2, ‘NZZZZZ’=DOC_INDX3; #3, ALL_OTHER_TERMS= DOC_INDX4 INDEX=ARTICLE.TEXT/TEXT_SCS, AREAS=('DZZZZZ'=DOC_INDX2,+ 'NZZZZZ'=DOC_INDX3, ALL_OTHER_TERMS=DOC_INDX4),+ TERMS=(INDEX_NULLS=NO,SINGULAR=YES,INSERT_METHOD=RANDOM,SIZE=1:250),+ REFERENCES=(INSERT_METHOD=RANDOM,PROXIMITY=WORD),TYPE=INCLUSIVE; INDEX=ARTICLE.TEXT#2 identifies the second partition in the TEXT field index, i.e., ‘NZZZZZ’=DOC_INDX3. 1. Run DMR using the default parameters show partition #1. DMR . USER ID > id USER PW > pw DATABASE > MEDRES ACTION > SHOW INDEX> ARTICLE.TEXT#1 . . Record EMPLOYEE Index ----ARTICLE.TEXT#1 Index Created in Versions ----- ------- -- -------All versions NORMAL TERMINATION - DMR 2. Run DMR ACTION=SHOW on partitioned indexed with some partitions dropped (partition #1 and #2 are dropped, but partition #3 is not). DMR ACTION=SHOW UID=id UPW=pw DB=SCOPIN INDEX=ARTICLE.TEXT DMR V5 R21 20090224 LIB(D884 S196 A001) [10.3] CS010 Record OPINION Index ----ARTICLE.TEXT#1#2 Index Created in Versions ------------------------Not created for specified version NORMAL TERMINATION - DMR 3. Run DMR ACTION=DROP partition #1. DMR Restructure 655 DMR . USER ID > id USER PW > pw DATABASE > MEDRES ACTION > DROP INDEX> ARTICLE.TEXT#1 Feb 22, 2010 Feb 22, 2010 Feb 22, 2010 . . 12:31:27 12:31:29 12:31:29 Processing record ARTICLE Finished processing ARTICLE Files marked usable and reactivated NORMAL TERMINATION - DMR 4. Run DMR ACTION=CREATE partition #1. DMR . USER ID > id USER PW > pw DATABASE > MEDRES ACTION > CREATE INDEX> ARTICLE.TEXT#1 Feb Feb Feb Feb Feb 22, 22, 22, 22, 22, 2010 2010 2010 2010 2010 . 12:33:32 12:33:53 12:33:57 12:34:03 12:34:03 . Processing record ARTICLE Sorting index terms Processing index terms Finished processing ARTICLE Files marked usable and reactivated NORMAL TERMINATION - DMR 5. Run DMR ACTION=CREATE all partitions, one or more partitions already created. While processing a partitioned index, DMR will skip partitions that are not marked as dropped (deemed created) and issues a warning message. DMR ACTION=CREATE UID=id UPW=pw DB=MEDRES INDEX=ARTICLE.TEXT DMR V5 R21 20090224 LIB(D884 S196 A001) [10.3] CS010 Feb 24, 2010 14:18:24 Processing record ARTICLE *** WARNING *** partition 1 not dropped in index TEXT It is deemed already created and is therefore being bypassed. Feb 24, 2010 14:18:36 Sorting index terms Feb 24, 2010 14:18:43 Processing index terms Feb 24, 2010 14:18:52 Finished processing ARTICLE Feb 24, 2010 14:18:52 Files marked usable and reactivated NORMAL TERMINATION - DMR 656 DMR Restructure 6. Run DMR ACTION=SHOW, TRACE=FULL partition #1. DMR ACTION=CREATE UID=id UPW=pw DB=MEDRES INDEX=ARTICLE.TEXT#1 TRACE=FULL DMR V5 R21 20090224 LIB(D884 S196 A001) [10.3] CS010 Record ARTICLE Index ----- Index Created in Versions ------------------------- ARTICLE.TEXT#1 0 Processing the index in file / file_spec Statistics for the above index Feb 22, 2010 12:39:37 Term Statistics for the above index Depth Total Depth of Term Tree: 3 Nodes Average Term Node Size: Total Number of Nodes: Number of Level 0 Nodes: Number of Level 1 Nodes: Number of Level 2 Nodes: 4048 359 356 2 1 Bytes Nodes Nodes Nodes Nodes 45107 7 7 1 84 Terms Bytes Bytes Bytes Bytes 27168 76 Bytes Bytes per 72 Bytes per 48 Bytes in 10 272 Bytes in 1 Terms Total Number of Terms: Average Term Size: Median Term Size: Minimum Term Size: Maximum Term Size: Terms Free Space Total Free Space: Average Free Space: Node Median Free Space: Node Minimum Free Space: Nodes Maximum Free Space: Nodes Levels Reference Statistics for the above index Depth Average Depth of Reference Trees: 1 Levels DMR Restructure 657 Median Depth of Reference Trees: Minimum Depth of Reference Trees: Maximum Depth of Reference Trees: Nodes Average Reference Node Size: Total Number of Nodes: Number of Level 0 Nodes: Number of Level 1 Nodes: References Reference Size: Total Number of References: Reference Free Space Total Free Space: Average Free Space: Node Median Free Space: Node Minimum Free Space: 14507 Nodes Maximum Free Space: Nodes NORMAL TERMINATION - DMR 658 DMR Restructure 1 1 2 500 20613 20234 379 Levels Levels Levels Bytes Nodes Nodes Nodes 8 1339373 Bytes References 520908 20 Bytes Bytes per 20 Bytes per 20 Bytes in 4056 Bytes in 2