EN
Español
English
Português
    Defragment Indexes and Update Database Statistics

    Index defragmentation tasks help improve the performance of databases by improving access to data on disk, and it is advisable to perform these tasks periodically to ensure proper database functioning. These tasks help the execution plans to be compiled with the latest statistics from the database.

    Consider the following procedure:

    1. Make sure that specialists are not editing, querying or entering data into the tools of the Aranda suite. You can stop Internet Information Services (IIS) for this.

    2. Stop the Aranda Suite services on the application server and delete the productkey table using the statements:

    EXEC PRC_ASDK_LICENCES 'D', 'A', NULL, NULL;
    
    DELETE FROM PRODUCTKEY;
    

    3. Run this script. It is not recommended to update statistics too frequently as this invalidates the execution plans stored in the server cache. For this reason, in the script you will find the parameter @statistics with the value ‘OFF’. When you need to update the statistics, change the mentioned parameter to the value ‘ON’.

    4. Restart all Aranda Suite and Internet Information Services (IIS) services.