Gathering DB2 database statistics dailyUse the provided script to gather statistics about DB2 database table usage. Run the scripts nightly using the DB2 Task Center, for example, to update internal statistics used by DB2. Up-to-date statistics are necessary for proper performance. This procedure is relevant for DB2 databases only. Oracle and SQL Server gather statistics automatically.
About this taskYou can collect statistics while IBM Connections is running and in use. However, it is best to schedule statistic collection to run on a regular basis during off-peak hours using a tool such as DB2 Task Scheduler.
To gather DB2 database statistics...
- Copy the statistics script named runstats.sql to the root directory of the application database for which you want to gather statistics. The script is stored in the following subdirectory of the IBM Connections installation files:
- AIX or Linux™:/Lotus_Connections_Install/connections.sql/ <application_subdirectory>/db2
- Microsoft™ Windows™:\Lotus_Connections_Install\connections.sql\ <application_subdirectory>\db2
- Log into the database server using an ID that has administrative privileges.
- Open a command prompt, and then change to the directory to which you copied the script.
- Use the following command to run the application scripts:
- For Bookmarks and Profiles:db2 -tvf runstats.sql
- For Home page:db2 -tvf updateStats.sql
- For Files and Wikis:db2 -td@ -vf updateStats.sql
Parent topicMaintaining application databases