Siebel Tools Reference > Performance Improvement > Performance Troubleshooting Using Spooled SQL >

Analyzing the Trace File and Query Plans


A query plan is a detailed reporting of various statistics about the query you executed.

To obtain a query plan for an SQL statement in your trace file

  1. Execute the Interactive SQL (dbisqlc.exe) program, located in Siebel Tools and in the Web Client Installation Directory. The Data window opens.
  2. Click for full size image

  3. Copy and paste the SQL statement to analyze into the Command windowpane.
  4. Replace bind variable references with the corresponding bind variable values.
  5. Click the Execute button.
  6. The query runs against the local SQL Anywhere database.

  7. The Statistics windowpane provides analysis information.

As you look through the trace file and run query plans, you should be aware of:

Run your query plans against datasets that are comparable to the production dataset. You will not obtain useful results analyzing the performance of a query against a 30-record test dataset when the production database has 200,000 records.

You may find it useful to prioritize the views to examine, as follows:

Comparison with the standard Siebel application provides your benchmark for evaluation. It is often very useful to obtain a trace file from the standard Siebel application, following a preselected route through the views. Then you obtain a separate trace file from the custom-configured application, following the same route as closely as possible. The two trace files are compared, noting differences in the bullet items listed previously.

You can tell where each new business object is being opened by searching for the S_APP_QUERY statement. You can determine which business object has been accessed by checking the Bind Variable statements beneath the query. Bind variables are the values that determine which records are brought back. The database software substitutes the value of a bind variable into an SQL statement when the same SQL statement is being reused, generally in place of each occurrence of a question mark or series of question marks. A business object bind variable is used in an S_APP_QUERY statement because the purpose of this statement is to open the business object.

Watch for the following indications of potential problems:


 Siebel Tools Reference, Version 7.5, Rev. A 
 Published: 18 April 2003