> Main > Products and Services > Purchase > Company
English / Russian


CNStats 3.4 Manual

© "CN-Software" Ltd. 2002-2008
Previous | Table of Contents  | Next

Database Management

The section is intended for CNStats database management.

Database management operations may take a lot of time. If you are not sure that you have right to launch long-working PHP-scripts, then you should execute these requests manually by means of database management application. It may be MySql console client or special applications, such as phpMyAdmin.

CNStats will try to increase time execution of PHP-script (this time is set up by means of $STATS_CONF["slow_reports_time_limit"] option in the config.php file). Unfortunately, script execution time increasing may be forbidden by the server administrator.

You can perform the following options in this section:

Rebuild Attendance Statistics by Days

Statistics rebuilding is usually required in case statistics for one or more days is absent (the so-called lost days). As a rule, such statistics accumulation failures are related to complete or partial server inoperability.

Note: You should not perform this operation too often. In case statistics data for certain days remains absent, then you should postpone midnight accumulation for several minutes. It can be done with the help of $COUNTER["timeoffset"] option.

If statistics for some days is still lost, we recommend you to change the hosting-provider.

Repair Database

This operation is intended for restoring the database operability in case of failures caused by incorrect functioning of the file system or MySql. As a rule, such errors occur because of insufficient disk space or emergency shutdown of the server.

Optimize Database Size

You should perform database optimization in order to increase MySql efficiency and to free disk space from deleted records. (record deletion does not always free space in MySql). This operation should be performed after deletion of old days from the statistics (see below).

Delete Old Days from Statistics

This operation is performed automatically once a day - at midnight. In case you'd like to free space immediately after changing the option $COUNTER["savelog"], then you may delete the old days statistics manually anytime. (To physically free space after this operation, you should optimize the database (see above)).

Previous | Table of Contents  | Next