Skip to main content
5 of 7
added 18 characters in body
atokpas
  • 8.7k
  • 1
  • 17
  • 27
  • **Index Maintenance:** Generally speaking you don't need to rebuilt b-tree indexes because they are self-managed.

    When to rebuild Indexes?

    Index Internals- Rebuilding The Truth

  • **Integrity Check:** Oracle has DBVERIFY(dbv) command-line utility for physical data structure integrity check. But you can't use this tool on Amazon RDS as it doesn't provide shell access to database instance.

    DBVERIFY: Offline Database Verification Utility

  • **Statistics:** The preferred method for gathering statistics in Oracle is to use the supplied automatic statistics gathering job. Or you can gather it manually using `DBMS_STATS` package. Details are given in the following white paper.

    Best Practices for Gathering Optimizer Statistics

    In SQL Server stats are automatically taken care of when a table grows by 500 rows + 20%, is there an Oracle equivalent?

    How often we should gather statistics is depend upon how much changes are being made in the tables which affect the query plan. In other words when statistics become stale we need to gather statistics. You can set stale percentage threshold for a table using STALE_PERCENT(default is 10%) parameter of SET_TABLE_PREFS procedure under DBMS_STATS package. For details:

    DBMS_STATS

  • **Tablespaces:** You can define the increment size using `AUTOEXTEND ON NEXT` clause either in `CREATE TABLESPACE` or `ALTER TABLESPACE` statements. >And also is it not better practice to presize these to avoid any growth during production hours?

    Auto extending doesn't affect the performance noticeably as it doesn't happen frequently unless we specify very small size on NEXT clause.

    CREATE TABLESPACE

  • **Important DBA and Performance Views:** Some the of the important dynamic performance views are given below(v$ views).

    V$SESSION: Currently active sessions.

    V$SQL: SQL command recently executed and its related information.

    V$SGA: Statistics related to Oracle's shared memory called SGA.

    Dynamic Performance View Description

  • atokpas
    • 8.7k
    • 1
    • 17
    • 27