Using the Compact Files Command

Use the Compact Files command from the Operation menu or click the Compact Files toolbar button, to optimize the use of storage and to reduce fragmentation. For details, see "Compacting Files", in Chapter 3.

To compact your database files

  1. Select the Compact Files command from the Operation menu or click the Compact Files toolbar button. The Select Files to Compact dialog is then displayed.

  2. If you do not want the database files in the Database Files list box at the left of the dialog sorted by file number (the default), select the Sort by file name or the Sort by file directory and name item in the Sort by drop‑down list box.

  3. Select the required database file or files for compaction, by performing one of the following actions.

    • Select the files from the Database Files list box. The selected files are highlighted. When you have selected all of the files that you require, click the Add button.

    • To select all of the database files, click the Add All button.

    • Select each file by double-clicking the file in the Database Files list box.

    The selected files are then moved to the Selected files list box at the right of the dialog.

  4. To remove database files from the Selected files list box, perform one of the following actions.

    • Select the files for removal from the Selected files list box. When you have selected all of the files for removal, click the Remove button.

    • To remove all of the files from the Selected files list box, click the Remove All button.

    • Select each file by double-clicking the file in the Selected files list box.

    The selected file names are moved back to the Database Files list box at the left of the dialog.

  5. If you want to look for system database files, check the Show System Files check box. (By default, system files are not displayed for selection; that is, user schema files only are displayed when you first access this dialog.)

  6. If you do not want user schemas displayed for selection, uncheck the Show User Schema Files check box. (By default, user schema files are displayed for selection when you first access this dialog.)

  7. If you want to compact multiple database files in parallel, check the Use multiple workers check box and then specify in the workers text box the number of workers (greater than 1) that you require.

    The Use multiple workers check box and the workers text box are unchecked and display zero (0), respectively, by default.

    If you do not specify the number of workers or you specify a number less than two workers, serial compact actions are performed.

  8. When your list of selected files is complete, click the OK button to start the operation. Alternatively, click the Cancel button to abandon your selections.

While the operation is running, a progress dialog is displayed that enables you to monitor the progress of the operation. You can abort the run, by clicking the Cancel button.

When the operation is finished, the progress dialog is closed and the following message is displayed in the running report.

<<Database file compaction complete>>

Detailed results of the operation are written to the compact.log file. (To view the log, select the compact.log submenu from the View menu View Logs command. For details, see "Viewing Log Files", later in this chapter.)

The files created during the compaction process are listed in the following table.

File Description
database-file.reo Working copy of original file – output of compaction
compact.log Summary of compaction process, including errors

The database-file.reo work file is present only during the compaction process, and is left behind in the event of an interruption to the compaction process. The compact.log file is always created, and successive compactions are appended to the log file.

The database-file.reo file is usually created in the same directory as the file that is being compacted. If you want to locate the file in a different directory, specify the name in the Working Directory text box of the Set Preferences dialog. For details, see "Setting Your JADE Database Utility Preferences", later in this chapter.