Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Performance improvements, diagnostics, and monitoring » Application profiling tutorials » Tutorial: Diagnosing table fragmentation


Lesson 2: Identifying and fixing table fragmentation using SQL

You can also identify and fix table fragmentation using SQL.

 Check for table fragmentation
  1. In the left pane of Sybase Central, click app_profiling - DBA, and then click File » Open Interactive SQL.

    Interactive SQL starts and connects to the app_profiling.db database.

  2. In Interactive SQL, execute the following SQL statement to test for table fragmentation on the Employees table:

    CALL sa_table_fragmentation( 'Employees' );

    If the value in the segs_per_row (the number of segments per row) column is greater than 1.1, then table fragmentation is present. Higher degrees of fragmentation may negatively impact performance.

  3. In Interactive SQL, execute the following REORGANIZE TABLE statement to reduce table fragmentation:

  4. You have completed the tutorial on diagnosing table fragmentation.

 See also