Lesson 1: Create a baseline procedure

 To 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 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 the 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:

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

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

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

    1. Create a table:

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

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

      COMMIT;
  5. Close Interactive SQL.

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

 See also