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: Baselining with procedure profiling


Lesson 1: Creating a baseline procedure

 Create a baseline procedure
  1. This tutorial assumes you have created the test database required for the application profiling tutorials. If you have not, see Creating 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, click Connections » Connect With the SQL Anywhere 12.

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

      • Authentication   Database

      • 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 the left pane, click app_profiling - DBA, and then click File » Open Interactive SQL.

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

  4. In Interactive SQL, execute the following SQL statements:

    1. Create a table:

      CREATE TABLE table1 (
      Count INT );
    2. Create a baseline procedure:

      CREATE PROCEDURE baseline( )
            INSERT table1 
               SELECT COUNT (*)
                  FROM rowgenerator r1, rowgenerator r2, 
                       rowgenerator r3 
               WHERE r3.row_num < 5;
    3. Commit the changes you made to the database:

  5. Close Interactive SQL.

  6. Click this link to continue the tutorial: Lesson 2: Running an updated procedure against the baseline procedure.

 See also