Search code examples
sqloracle-xe

ORACLE XE clear Top Sql Statistics


The "top" SQL statements represent the SQL statements that are executed most often, that use more system resources than other SQL statements, or that use system resources more frequently than other SQL statements. Viewing the top SQL statements report that is available in the Oracle Database XE graphical user interface enables you to focus your SQL tuning efforts on the statements that can have the most impact on database performance.

But how do I clear the information currently held?


Solution

  • Try to flush the shared pool:

    ALTER SYSTEM FLUSH SHARED_POOL;
    

    Because the shared pool contains the SQL cache, cleaning it, also it's going to clear the other data.

    Of course, be carefull because it also flush other useful data:

    • Cached data dictionary information and
    • Shared SQL and PL/SQL areas for SQL statements, stored procedures, function, packages, and triggers.

    References: