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

SQL Anywhere 12.0.0 (Français) » SQL Anywhere Server - SQL Usage » Monitoring and improving database performance » Application profiling tutorials » Tutorial: Diagnosing index fragmentation

 

Lesson 1: Find and fix index fragmentation using the Application Profiling Wizard

Use this procedure to find and fix index fragmentation. It is recommended that you periodically check for fragmentation on your production database.

 ♦  To find and fix index fragmentation
  1. This tutorial assumes you have created the test database, app_profiling.db, required to use the application profiling tutorials. If you have not, see Create a test database for the application profiling tutorials.

  2. Connect to app_profiling.db as follows:

    1. In Sybase Central, in the SQL Anywhere 12 plug-in, choose Connections » Connect With SQL Anywhere 12.

    2. In the Connect window, complete the following fields to connect to the test database, app_profiling.db, and then click Connect:

      • User ID    DBA

      • Password    sql

      • Action   Start A Database On This Computer

      • Database File   C:\AppProfilingTutorial\app_profiling.db

      • Start Line   dbeng12 -x tcpip

  3. Choose Mode » Application Profiling.

    If the Application Profiling Wizard does not appear, choose Application Profiling » Open Application Profiling Wizard.

  4. On the Welcome page, click Next.

  5. On the Profiling Options page, select Overall Database Performance Based On The Database Schema, and then click Next.

  6. On the Analysis File page, in the Save The Analysis To The Following File field, type C:\AppProfilingTutorial\analysis.

  7. Click Finish.

    A list of recommendations appears in the Application Profiling Details pane.

  8. If you see Fragmented Indexes, double-click it. A Recommendation window appears containing a SQL statement you can run to resolve the index fragmentation.

  9. You have completed the tutorial on using application profiling to identify and fix index fragmentation.

    Note

    You can also identify and fix index fragmentation using SQL. See Identifying and fixing index fragmentation using SQL.

 See also