Lesson 1: Checking for table fragmentation using the Application Profiling Wizard

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

 Find and fix table fragmentation
  1. This tutorial assumes you have created the test database, app_profiling.db, required to complete the application profiling tutorials.

  2. Connect to app_profiling.db as follows:

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

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

      • 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. Click Connect.

  3. In Sybase Central, click Mode » Application Profiling.

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

  4. On the Profiling Options page, click Overall Database Performance Based On The Database Schema.

  5. On the Analysis File page, save the analysis file in the appropriate directory. For example, C:\AppProfilingTutorial. If you are prompted to replace the file because it already exists, click Yes.

  6. Click Finish.

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

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

  8. You have completed the tutorial on using application profiling to identify and fix table fragmentation.

    Note

    You can also identify and fix table fragmentation using SQL.

 See also