Database Maintenance - MySQL / MariaDB (Connect 2024)

Reorganize Database Indexes

The automatic clean-up functionality of Connect removes a significant number of records resulting in fragmentation of the corresponding database indexes. To address this issue, the following MySQL script should be scheduled for daily database maintenance:

To reorganize all Connect application-specific indexes, use the following MySQL script:

Delete Obsolete Data

If there is a need to delete all Contexts and Performance Records created before a specific date, the following script can be employed. Be aware that fragmented indexes may cause poor performance during deletion. If required, optimize these indexes prior to deleting data. Ensure to adjust the date in the first line of the script as needed: