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

SAP Sybase SQL Anywhere 16.0 » 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 for procedure profiling purposes.


This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Baselining with procedure profiling.

This tutorial assumes that you have created the test database, app_profiling.db. See Tutorial: Creating a test database for the application profiling tutorials.

  1. Start Interactive SQL. Click Start » Programs » SQL Anywhere 16 » Administration Tools » Interactive SQL.

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

    1. In the Authentication field, type Database.

    2. In the User ID field, type DBA.

    3. In the Password field, type sql.

    4. In the Action dropdown list, select Start and connect to a database on this computer.

    5. In the Database file field, type C:\AppProfilingTutorial\app_profiling.db.

    6. In the Start Line field, type dbsrv16 -x tcpip.

  3. Click Connect.

  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.


You have created a baseline procedure to use for comparison purposes.