Show TOC

Managing Database Statistics with BR*ToolsLocate this document in the navigation structure

Prerequisites

Context

You can use BR*Tools for Oracle to manage database statistics.

Procedure


  1. Start the procedure using BRGUI or BRTOOLS, or from the command line:

    • BRGUI or BRTOOLS:

      1. Choose Start of the navigation path Database Statistics Next navigation step Manage database statistics End of the navigation path.

        BRGUI or BRTOOLS displays the menu BRSPACE main options for managing database statistics, where you specify the options with which you call BRSPACE.

      2. Set the required options:

        Menu Entry

        Equivalent BRSPACE Command Option

        BRSPACE profile (profile)

        -p|-profile

        Database user/password (user)

        -u|-user

        Statistics action (action)

        -f mstats -a|-action

        Statistics export Id (expid)

        -f mstats -i|-expid

        Tablespace names (tablespace)

        -f mstats -s|-tablespace

        Table owner (owner)

        -f mstats -o|-owner

        Table names (table)

        -f mstats -t|-table

        Confirmation mode (confirm)

        -c|-confirm

        Extended output (output)

        -o|-output

        Scrolling line count (scroll)

        -s|-scroll

        Message language (language)

        -l|-language

        BRSPACE command line (command)

        This shows you the BRSPACE -f mstats command that is to be executed using the current settings.

      3. Choose Continue.

        BRGUI or BRTOOLS prompts you to start BRSPACE.

      4. Choose Continue to start BRSPACE.

    • Command line:

      Enter at least the following command:

      brspace -f mstats

      You can enter more parameters, including the action, if required. For more information, see BRSPACE -f mstats.

    Note

    Whichever way you start the procedure - with BRGUI or BRTOOLS, or from the command line - you can use quick mode if you know the object name, in this case the table name. For more information, see How to Use BR*Tools.

    BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log.

    BRSPACE displays the Manage database statistics main menu.

  2. You can use quick mode as follows:

    • If you have already entered the action, continue with step 4.

    • If you have already entered the table name and action, continue with step 6.

    Note

    If you have entered multiple table names, BRSPACE displays as confirmation a List of tables for manage statistics. You cannot make a selection from this list. If required, go back and make a new selection.

    Continue with step 6 (quick mode).

  3. Choose or confirm the required action:

    • Export table statistics

    • Import table statistics

    • Delete table statistics

    • Restore table statistics

    • Lock table statistics

    • Unlock table statistics

    • Delete statistics exports

    • Show statistics exports

    • Show statistics versions

  4. If you have already entered the table name, continue with step 6 (quick mode).

    BRSPACE displays the table or export list, depending on which action you chose:

    • For actions export, delete, restore, lock, or unlock table statistics:

      List Entry

      Meaning

      Pos.

      List sequence number

      Owner

      Table owner

      Table

      Table name

      Part.

      Partitioned status

      Vers.

      Number of statistics versions

      Lock

      Lock status

      Analyzed

      Date last analyzed by update statistics

      Rows

      Number of rows

    • For actions import table statistics, delete statistic exports, or show statistics exports:

      List Entry

      Meaning

      Pos.

      List sequence number

      Run

      Export run

      Date

      Date of export

      Export Id.

      Export ID

      Owner

      Export owner

      Tables

      Number of tables

    Note

    BRSPACE only displays entries that can be processed by your chosen action.

  5. Select a table or export or select multiple tables or exports.

    Example

    These examples apply only to input in character mode.

    To select the first three tables or exports in the list, enter 1-3.

    To select the first and third tables or exports, enter 1,3.

    To select the first three tables or exports and the fifth, enter 1-3,5.

    To select all entries, enter 0.

    For actions export, delete, restore, lock, and unlock, BRSPACE displays the menu Options for manage statistics of tables.

  6. For actions export, delete, restore, lock, and unlock, set the required options:

    Menu Entry

    Meaning

    Last analyzed time stamp (analyzed)

    - display only

    Date and time of the last statistics analysis for the selected tables

    Number of statistics versions (stats_vers)

    - display only

    Number of statistics versions for the selected tables

    Current statistics lock status (stats_lock)

    - display only

    Current lock status for the selected tables

    Manage statistics action (action)

    The action that you selected above.

    Statistics export Id (expid)

    -f mstats -i|-expid

    Time for restore statistics (time)

    -f mstats -m|-time

  7. To start processing with the selected options, choose Continue.

Results

Check the results in the BRSPACE logs.

For more information about how to view the logs with BR*Tools, see Showing Profiles and Logs with BR*Tools.