sp_client_addr  sp_cmp_qplans

Chapter 1: System Procedures

sp_cmp_all_qplans

Description

Compares all abstract plans in two abstract plan groups.

Syntax

sp_cmp_all_qplans group1, group2 [, mode]

Parameters

group1, group2

are the names of the 2 abstract plan groups.

mode

is the display option, one of: counts, brief, same, diff, first, second, offending and full. The default mode is counts.

Examples

Example 1

Generates a default report on 2 abstract plan groups:

sp_cmp_all_qplans dev_plans, prod_plans
If the two query plans groups are large, this might take some time.
Query plans that are the same
 count
 ----------- 
          49 
Different query plans that have the same association key
 count
 ----------- 
           1 
Query plans present only in group ’dev_plans’ :
 count
 ----------- 
           1 
Query plans present only in group ’prod_plans’ :
 count
 ----------- 
           0

Example 2

Generates a report using the brief mode:

sp_cmp_all_qplans dev_plans, prod_plans, brief

Usage

Permissions

Any user can execute sp_cmp_all_qplans.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

System procedures sp_cmp_qplans, sp_help_qpgroup





Copyright © 2005. Sybase Inc. All rights reserved. sp_cmp_qplans

View this book as PDF