Updating Statistics in Collections for use in Reports and Charts

From RapidSQL
Jump to: navigation, search

Go Up to Using Capacity Analyst

Once you have installed and set up Capacity Analyst on a server, raw statistics are gathered and stored in the repository on that server. In order to view up-to-date charts and reports, you must execute a collection. Executing the collection calculates totals and performs all rollups for that collection in preparation for reporting.

There are two methods of updating statistics in a collection:

Manually Updating Collections

You can manually execute a statistics collection. This calculates totals and statistical indicators such as averages used for reporting for that collection.

To manually execute a collection

  1. Open the Capacity Analyst. See Opening the Capacity Analyst.
  2. Select a collection and then on the Capacity Analyst toolbar click the Execute button.
    bb155155.jpg
    When complete, the Last Run field reflects the time that the collection was updated.

After executing a collection, you can run reports or view charts for that collection, that are up-to-date as of the time that you executed the collection. For details, see Viewing Charts and Reports on Collections.

Scheduling Updates of Collections

If you run reports or want to regularly archive statistics for intervals, you can schedule execution of statistics collections. This updates the totals, rollups, and statistical indicators such as averages, on a regular basis. You can schedule collection updates to occur regularly such as daily weekly, or monthly, or tie execution to events such as system startup, logon, or during idle time.

The following topics provide details on the scheduling tasks you can perform against a collection:

Creating an Update Collection Schedule

You can create an update collection schedule to have statistics in that collection updated at regular intervals or have updates triggered by events such as system startup or logon.

In setting up your schedule, keep the following points in mind:

  • Some statistical collections depend on the underlying dynamics of the database objects being collected. For example, storage structure space metrics, table and index statistics, etc., are oftentimes best collected only once a day. Other statistics, such as wait events and global database metrics can be collected on a much more granular level (every hour, etc.)
  • If you routinely stop and start your database at a certain time, you may want to ensure that your collection job is not scheduled to run during its downtime. Also realize that stopping and starting a database resets the counters used for wait events and global database metrics.
  • If you use the Microsoft scheduler on your machine, remember to not turn your machine off during the times your collection is scheduled to run or the job will not run.
Tip: You can add, edit, or remove any schedule for any collection at a later time by using the management functions supplied in the Capacity Collection Manager interface.

To schedule updates for a collection

  1. Open the Capacity Analyst. See Opening the Capacity Analyst.
  2. Select a Capacity Collection that currently does not have an associated execution schedule.
  3. Click the Schedule button.
    bb155187.jpg
    Capacity Analyst opens the Job Scheduler.
  4. Use the Job Scheduler to specify the frequency of the report or the event that triggers the update, and other details of the schedule.
  5. When finished, click OK.

Editing an Update Collection Schedule

After creating an update schedule for a statistics collection, you can revise the schedule. You may wish to change the frequency of updates or the event which triggers an update, or more specific details of the update schedule.

To modify the update schedule for a collection

  1. Open the Capacity Analyst. See Opening the Capacity Analyst.
  2. Select a Capacity Collection that currently has an associated execution schedule.
  3. Click the Edit Schedule button.
    bb1551a6.jpg
    Capacity Analyst opens the Job Scheduler.
  4. Use the Job Scheduler to change the frequency of the report or the event that triggers the update, and other details of the schedule.
  5. When finished, click OK.

Deleting an Update Collection Schedule

If you no longer want statistics in a collection to be calculated on a regular basis or if you want to create a new, completely reworked schedule, you can delete the existing schedule for a collection.


To unschedule a Capacity Collection

  1. Open the Capacity Analyst. See Opening the Capacity Analyst.
  2. Select a Capacity Collection.
  3. On the Capacity Analyst toolbar, click the Unschedule button.
    bb1551c8.jpg
    Capacity Analyst unschedules the Capacity Collection.


Purging Old Data in a Collection

Policy or practicality may dictate that the metrics in your analysis and reports not include data older than a specified date. Capacity Analyst lets you manually purge data older than a specified number of months or years.

Note: In addition to manually purging old data, when creating or editing a collection, you can set up the collection to automatically purge data older than a specified date on every update. For details, see Creating and Editing Collections.

To manually purge collection data older than a specified number of months or years

  1. Open the Capacity Analyst. See Opening the Capacity Analyst.
  2. Select a Capacity Collection.
  3. On the toolbar, click the Purge button.
    bb1551e7.jpg
    The Perform Manual Data Purge dialog opens.
  4. Use the controls in the Purge data older than area to provide a specific number of months or years.
  5. Click Execute and when prompted to confirm, click Yes.

Topics