- WDOptimizer proposes several modes for optimizing indexes:
- How to?
- Optimizing the indexes of a data file
- Re-indexing options
- Advanced reindexing mode
- Options for compressing memos
- Access rights to the data file
Optimizing the indexes
Available only with these kinds of connection
WDOptimizer proposes several modes for optimizing indexes:
1. Check the indexes: Checks the consistency between the index and the data files.
2. Optimize the speed of indexes (recalculating the stat): Optimizes the indexes by calculating statistics on the indexes. These statistics are used to optimize the filters, the queries and the HFSQL views.
Remark: The more the data file is modified, the less the statistics reflect the content of HFSQL data file. The more records the data file contains, the less the modification of a single record impacts the overall statistics.
3. Rebuild the indexes: Optimizes the access to the records of the data file and re-calculates the statistics. All the crossed records are automatically deleted.
4. Rebuild the indexes and the memos: Optimizes the entire data file, its index and its memos.
5. Check and compress the indexes and the memos
: Optimizes the entire data file, its index and its memos. The memos will be compressed. Advanced options are available ("Options for compressing the memos").
Remark: The data file is recreated: the last writing date of the last record (obtained by HRecordDate
) is set to today's date.
- Apart from option 2, all the optimization modes lock the data files during the optimization. The users are informed that the data file is currently under maintenance.
- Once the reindexing is performed, the current HFSQL context is restored (except if the option for compressing memos was chosen).
Optimizing the indexes of a data file
To optimize the indexes of a data file:
- Start WDOptimizer:
- From WINDEV, WEBDEV or WINDEV Mobile directly: on the "Tools" tab, in the "Database" group, click "WDOptimizer".
- run "WDOptimizer.EXE" directly.
- Select the data files to process. You can:
- Drag and Drop the data files from the explorer to WDOptimizer. The dropped files automatically appear in the list.
- add one or more files via the "Add a file" button.
- add the data files found in a directory via the "Add a folder" button.
To process the sub-directories, select "When adding a directory, include the files of all the sub-directories".
- Select the data files to process and indicate (if necessary) the password of each data file.
Remark: If the password is identical for all the data files, check "The password is identical for all the files".
- Click the "Optimize the indexes" or "Optimize the indexes of selected files" button and choose the requested option.
A report is generated if a problem occurs.
The indexing options are displayed in the lower part of the screen:
Advanced reindexing mode
These options are taken into account for the re-indexing operations from type 1 to type 4:
- Delete the inactive records (deleted or crossed)
If this option is selected, the crossed records are permanently deleted.
Reminder: When a record is crossed, it is deleted logically and it can be retrieved later. The record is still found in the data file. Deleting the crossed records deletes these records permanently and optimizes the size of data file.
- Delete the damaged records
If this option is checked, the damaged records are automatically deleted.
- Reindex without locking the client computers
If this option is checked, the re-indexing operation is performed in background task and the client applications are not stopped.
Caution: This option is taken into account for the HFSQL Client/Server data files only.
- Density of the index
Corresponds to the density rate of indexes. This rate is set to 80 by default.
A higher rate increases the density of the index and reduces its size. In this case, the browses, searches, filters and queries are faster. The additions of records and the modifications of records may be slower.
A smaller rate reduces the density of the index and increases its size. In this case, the browses, searches, filters and queries will be slower. The additions of records and the modifications of records will be faster.
Caution: this parameter can be used on the data files in HFSQL Classic or Client/Server format only.
- Character set
The character set of the data file is kept by default. However, a re-indexing operation can be performed by changing the character set of the data file. In this case, the new character set will be taken into account during the re-index operation. The sorts, the searches, ... on string keys (strings, characters, date and time) will be performed according to this character set.
Options for compressing memos
These options are taken into account during the revision with compression of indexes and memos (option 5):
- Keep the crossed records
If this option is selected, the crossed records are kept. Otherwise, they are permanently deleted.
- Attempt to retrieve data from the memo if it is damaged
If this option is selected, WDOptimizer tries to retrieve the memo. Otherwise, the damaged records are retrieved without the associated memo.
Caution: The memo may not be entirely retrieved. Check your data files.
These options are used to simplify the management of the list of files to re-index:
- The password is identical for all the files
If this option is selected, the same password is used for all the data files. All you have to do is specify the password in the "Password" column of the first data file found in the list.
If this option is unchecked, the password will have to be specified in the "Password" column of the table for each data file.
- When adding a directory, include the files found in all the sub-directories
If this option is selected, the data files found in the sub-directories are automatically added.
Access rights to the data file
The optimization triggers the re-creation of the data file on disk.
You must check the rights of the optimized file. These rights can differ from the ones of the source file. In this case, they must be redefined in Windows after the optimization.
This page is also available for…