How To Fix DB6128 - The table statistics are no longer current


SAP Error Message - Details

  • Message type: E = Error

  • Message class: DB6 - DB6: Alert Monitoring and Alert Configuration

  • Message number: 128

  • Message text: The table statistics are no longer current

  • Show details Hide details
  • Copy of DB6 126

    What causes this issue?

    Among other things, statistical information about tables (size,
    distribution of values, and so on) is stored in the database system
    tables (system catalog). The optimizer then analyzes this informaiton
    when creating access plans for SQL statements.
    For tables with variable datasets (transaction data), this statistical
    information must be regularly adjusted.

    System Response

    The better these statistics, the better the optimizer can create plans.
    Conversely, obsolete data or statistics that are missing completely can
    cause poor access plans and therefore poor performance.

    How to fix this error?

    Maintain the table statistics with the help of the predefined actions
    in the DB13 planning calendar. You can find more information about this
    topic in the online documentation for the planning calendar. In the
    special case of a BW system, there is a special report:
    SAP_ANALYZE_ALL_INFOCUBES. This produces distributed statistics.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message DB6128 - The table statistics are no longer current ?

    The SAP error message DB6128 indicates that the table statistics for a specific database table are outdated or no longer current. This can lead to suboptimal query performance because the database optimizer relies on accurate statistics to determine the most efficient way to execute queries.

    Cause:

    The statistics for a table can become outdated due to several reasons:

    1. Data Changes: Significant changes in the data, such as bulk inserts, updates, or deletes, can render existing statistics inaccurate.
    2. Time: Over time, as data is modified, the statistics may no longer reflect the current state of the data.
    3. Database Maintenance: Certain maintenance operations, like reorganizing or rebuilding indexes, can also affect the accuracy of statistics.

    Solution:

    To resolve the DB6128 error, you need to update the table statistics. Here are the steps to do this:

    1. Use SAP Transaction Code:

      • You can use transaction code DBACOCKPIT or ST04 to access the database performance monitoring tools.
      • Navigate to the relevant section for updating statistics.
    2. Run the Statistics Update:

      • Depending on your database system (e.g., Oracle, SQL Server, HANA), the method to update statistics may vary:
        • For Oracle: Use the DBMS_STATS.GATHER_TABLE_STATS procedure.
        • For SQL Server: Use the UPDATE STATISTICS command.
        • For SAP HANA: Use the UPDATE STATISTICS command.
      • You can also use the SAP transaction ST02 to monitor and manage buffer and memory settings, which can indirectly help with performance.
    3. Schedule Regular Updates:

      • To prevent this issue from recurring, consider scheduling regular updates of table statistics as part of your database maintenance plan.
    4. Check for Other Issues:

      • If the problem persists after updating statistics, check for other underlying issues such as database configuration, index fragmentation, or hardware performance.

    Related Information:

    • Monitoring Tools: Use SAP's monitoring tools (like ST04, ST03) to keep an eye on database performance and identify when statistics need to be updated.
    • Database Documentation: Refer to the documentation specific to your database system for detailed commands and best practices for managing statistics.
    • SAP Notes: Check SAP Notes for any specific recommendations or patches related to your version of SAP and the database you are using.

    By keeping your table statistics current, you can help ensure optimal performance for your SAP applications.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker