When a record is deleted on a form the VPM Enterprise referential integrity routine is run and audit trail records are created. Both of these processes take time.
The VPM Enterprise referential integrity routine is run to find and handle related records in other tables. The referential integrity routine can take a significant amount of time if a table has a lot of related child, grandchild, etc. tables. You can speed up the process of finding related records by making sure there is an index tag created for each foreign key field in the child, grandchild, etc. tables. You may choose to forego the referential integrity check. However, it is not recommended that you abandon referential integrity in your applications.
If your tables are related by single field keys, you can turn off the VPM Enterprise referential integrity for deletes by not specifying the name of the Parent RI Cursor for the foregn key field in the Data Builder/Manager and instead use the Visual FoxPro referential integrity, which in some cases is faster than VPM Enterprise referential integrity.
When a user deletes a record on a form, the VPM Enterprise Audit Trail routine by default adds a record to the Audit Trail table for each field in the deleted record. If the table has child, grandchild, etc. related tables with the Cascade rule selected for deletes, records in the related tables are deleted and Audit Trail records are created for the deleted related table records. Consequently, the Audit Trail feature can slow down the deletion of a record significantly. You can increase the speed at which records are deleted by doing one of the following:
∑ Turn off the Audit Trail for the Application
∑ If you donít need the Audit Trail for any forms in an application, you can turn it off on the Admin Tools form reached from the Security popup on the applicationís Admin menu.
∑ Turn off the Audit Trail for Deletions on Selected Forms
∑ If you need the Audit Trail for some forms but not for others, donít turn the Audit Trail off on the Admin Tools form. Turn off the Audit Trail for forms that donít need it by setting the formsí lNoDeleteAuditTrail property to .T..
Note: This does not turn off the Audit Trail for changes and additions for a form. There are lNoChangeAuditTrail and lNoNewAuditTrail properties that control the creation of Audit Trail records for those functions.
∑ Turn off the Audit Trail for Selected Fields
∑ If you need the Audit Trail for some fields on a form but not for others, you turn can off the Audit Trail for fields that donít need it by unchecking the fieldsí Audit Trail field property checkboxes on the applicationís Data Builder/Manager form.