4D v13.4Compact page |
||
|
4D v13.4
Compact page
Compact page
You use this page to access the data and structure file compacting functions (see Description of 4D files). Compacting files meets two types of needs:
Note: Compacting is only available in maintenance mode. If you attempt to carry out this operation in standard mode, a warning dialog box will tell you that the database will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the database (see Compact records and indexes below). The standard compacting procedure for the data and structure file are identical. To directly begin the compacting of the data or structure file, click on the corresponding button in the MSC window: Data: Structure: Note: Since compacting involves the duplication of the original file, the button is disabled when there is not adequate space available on the disk containing the file. This operation compacts the main file as well as any index files. 4D copies the original files and puts them in a folder named Replaced Files (Compacting), which is created next to the original file. When the operation is completed, the compacted files automatically replace the original files. The database is immediately operational without any further manipulation. Notes:
Warning: Each compacting operation involves the duplication of the original file which increases the size of the application folder. It is important to take this into account (especially under Mac OS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful in order to keep the package size down. After compacting is completed, 4D generates a log file in the database folder. This file, named databasename_compact_log, is created in XML and HTML format. It can be used to view all of the operations carried out. The Compact page contains an Advanced> button, which can be used to access an options page for compacting data and structure files: The “Compact records and indexes” displays the pathname of the current data file as well as a [...] button that can be used to specify another data file. When you click on this button, a standard Open document dialog box is displayed so that you can designate the data file to be compacted. You must select a data file that is compatible with the open structure file. The second [...] button can be used to specify another location for the original files to be saved before the compacting operation. This option can be used more particularly when compacting voluminous files while using different disks. When this option is checked, 4D rewrites every record for each table during the compacting operation, according to its description in the structure. If this option is not checked, 4D just reorganizes the data storage on disk. This option is useful in the following cases:
Note: All the indexes are updated when this option is selected. (option only active when preceding option is checked) This option completely rebuilds the address table for the records during compacting. This optimizes the size of the address table and is mainly used for databases where large volumes of data were created and then deleted. In other cases, optimization is not a decisive factor. Note that this option substantially slows compacting and invalidates any sets saved using the SAVE SET command. Moreover, we strongly recommend deleting saved sets in this case because their use can lead to selections of incorrect data. Notes:
The “Compact structure file” area displays the pathname of the database structure file as well as a [...] button that can be used to specify another location for the original files to be saved before compacting begins. When you click on one of the Compact buttons, the operation begins immediately. When compacting is complete, 4D generates a report in the database folder. When you click on the Open log file button, 4D displays the log file in HTML format in the default browser of the machine (see Open log file). |
PROPERTIES
Product: 4D |