SOLID Server provides several diagnostic tools for observing performance. These tools, SQL info facility and the EXPLAIN PLAN statement, are helpful in tuning your application and identifying inefficient SQL statements in your application.
SOLID Server provides also tools for tracing the communication between client and server and locating problems that may slow down your application. The Network trace facility can be used in the server end and the Ping facility in the client end.
Observing Performance
Run your application with the SQL Info facility enabled. The SQL Info facility generates information for each SQL statement processed by SOLID Server.
SQL Info levels
The SQL Info facility is turned on by setting a non-zero value to the Info parameter in the [SQL] section of the configuration file. The output is written to a file named soltrace.out in the SOLID directory.
Example:
[SQL]
info = 1
The SQL Info facility can also be turned on with the following SQL statement (this sets SQL Info on only for the client that executes the statement):
SET SQL INFO ON LEVEL info-value FILE file-name
and turned off with the following SQL statement:
SET SQL INFO OFF Example: SET SQL INFO ON LEVEL 1 FILE my_query.txt
The EXPLAIN PLAN statement is used to show the execution plan that the SQL optimizer has selected for a given SQL statement. An execution plan is a series of primitive operations, and an ordering of these operations, that SOLID Server performs to execute the statement. Each operation in the execution plan is called a unit.
The syntax of the EXPLAIN PLAN statement is:
EXPLAIN PLAN FOR sql-statement
Explain Plan Table Columns
The table returned by the EXPLAIN PLAN statement contains the following columns.
The following texts may exist in the INFO column for different types of units.
Example 1
EXPLAIN PLAN FOR SELECT * FROM TENKTUP1 WHERE UNIQUE2_NI BETWEEN 0 AND 99;
ID
UNIT_ID
PAR_ID
JOIN_
PATHUNIT_
TYPEINFO
1
2
1
3
JOIN UNIT
2
3
2
0
TABLE UNIT
TENKTUP1
3
3
2
0
FULL SCAN
4
3
2
0
UNIQUE2_NI <= 99
5
3
2
0
UNIQUE2_NI >= 0
6
3
2
0
Execution graph:
JOIN UNIT 2 gets input from TABLE UNIT 3
TABLE UNIT 3 for table TENKTUP1 does a full table scan with constraints UNIQUE2_NI <= 99 and UNIQUE2_NI >= 0
![]()
Example 1. Execution graph
Example 2
EXPLAIN PLAN FOR SELECT * FROM TENKTUP1, TENKTUP2 WHERE TENKTUP1.UNIQUE2 > 4000 AND TENKTUP1.UNIQUE2 < 4500 AND TENKTUP1.UNIQUE2 = TENKTUP2.UNIQUE2;Execution graph:
JOIN UNIT 6 the input from order units 9 and 10 are joined using merge join algorithm
ORDER UNIT 9 orders the input from TABLE UNIT 8. Since the data is retrieved in correct order, no real ordering is needed
ORDER UNIT 10 orders the input from TABLE UNIT 7. Since the data is retrieved in correct order, no real ordering is needed
TABLE UNIT 8: rows are fetched from table TENKTUP2 using primary key. Constraints UNIQUE2 < 4500 and UNIQUE2 > 4000 are used to select the rows
TABLE UNIT 7: rows are fetched from table TENKTUP1 using primary key. Constraints UNIQUE2 < 4500 and UNIQUE2 > 4000 are used to select the rows
![]()
Example 2. Execution graph
Tracing Communication between Client and Server
SOLID Server provides following tools for observing the communication between client and server:
- the Network Trace facility
- the Ping facility
You can use these tools to analyze the functionality of the networking between client and server. The network trace facility should be used when you want to know why a connection is not established to the server. The ping facility is used to determine how fast packets are transferred between the client and server.
Network tracing can be done on the server, on the client or on both computers concurrently. The trace information is written to the default trace file or file specified in the TraceFile parameter.
The default name of the output file is SOLTRACE.OUT. This file will be written to the current working directory of the server or client depending on which end the tracing is started.
The file contains information about:
- loaded DLLs
- network addresses
- possible errors
The Network Trace facility is turned on by editing the configuration file
[Com]
Trace ={Yes|No}
; default No
TraceFile = file-name
; default soltrace.out
or by using the environment variables SOLTRACE and SOLTRACEFILE to override the definitions in the configuration file. Setting of SOLTRACE and SOLTRACEFILE environment variables have the same effect as the parameters Trace and TraceFile in the configuration file.
NOTE. Defining the TraceFile configuration parameter or the SOLTRACEFILE environment variable automatically turns on the Network trace facility.
A third alternative to turn on the Network trace facility is to use the option -t and/or -ofilename as a part of the network name. The option
-t turns on the Network trace facility. The option -o turns on the facility and defines the name of the trace output file.
Example 1. Defining Parameter Trace in the Configuration File
[Com]
Connect = nmp SOLID
Listen = nmp SOLID
Trace = Yes
Example 2. Defining Environment Variables
set SOLTRACE = Yes
or
set SOLTRACEFILE = trace.out
Example 3. Using Network Name Options
[Com]
Connect = nmp -t solid
Listen = nmp -t solid
or
[Com]
Connect = nmp -oclient.out solid
Listen = nmp -oserver.out solid
The Ping facility can be used to test the performance and functionality of the networking. The Ping facility is built in all SOLID clients and is turned on with the network name option -plevel.
The output file will be written to the current working directory of the computer where the parameter is given. The default name of the output file is SOLTRACE.OUT.
Clients can always use the Ping facility at level 1. Levels 2, 3, 4 or 5 may only be used if the server is set to use the Ping facility at least at the same level.
The Ping facility levels are:
Example 1
The client turns on the Ping facility by using the following network name:
nmp -p1 -oping.out SOLID
This runs the Ping facility at the level 1 into a file named SOLTRACE.OUT. This test checks if the server is alive and exchanges one 100 byte message to the server.
After the Ping facility has been run, the client exits with the following message:
SOLID Communication return code xxx: Ping test successful/failed, results are in file FFF.XX
Example 2
If the server is using the following listen parameter
[Com]
Listen = nmp -p3 SOLID
clients can run the Ping facility at levels 1, 2 and 3, but not 4 and 5.
NOTE. Ping clients running at level greater than 3 may cause heavy network traffic and may cause slowness of application using the network. They will also slow down ordinary SQL clients connected to the same SOLID Server.
PROBLEM REPORTING
SOLID Server offers sophisticated diagnostic tools and methods for producing high quality problem reports with very limited effort. Use the diagnostic tools to capture all the relevant information about the problem.
All problem reports should contain the following files and information:
- solid.ini
- license number
- solmsg.out
- solerror.out
- soltrace.out
- problem description
- steps to reproduce the problem
- all error messages and codes
- contact information, preferably email address of the contact person
Problem Categories
Most problems can be divided into the following categories:
- SOLID SQL API
- SOLID ODBC Driver
- UNIFACE driver for SOLID Server
- communication problems between client and server
The following pages include a detailed instructions to produce proper problem report for each problem type. Please follow the guidelines carefully.
SOLID SQL API Problems
If the problem concerns the performance of SOLID SQL API or a specific SQL statement, you should run SQL info facility at level 4 and include the generated soltrace.out file into your problem report. This file contains the following information:
- create table statements
- create view statements
- create index statements
- SQL statement(s)
SOLID ODBC Driver Problems
If the problem concerns the performance of SOLID ODBC Driver, please include the following information:
- SOLID ODBC Driver name, version, and size
- ODBC Driver Manager version and size
If the problem concerns the cooperation of SOLID Server and any third party standard software package, please include the following information:
- full name of the software
- version and language
- manufacturer
- error messages from the third party software package
Use ODBC trace option to get a log of the ODBC statements and include it to your problem report.
UNIFACE Driver for SOLID Server Problems
If the problem concerns the performance of for SOLID UNIFACE Driver, please include following information:
- SOLID UNIFACE Driver version and size
- UNIFACE version and platform
- Contents of the UNIFACE message frame
- Error codes from the driver, $STATUS, $ERROR
- all necessary files to reproduce the problem (TRXs, SQL scripts, USYS.ASN etc.)
Communication between Client and Server
If the problem concerns the performance of the communication between client and server use the Network trace facility and include the generated trace files into your problem report. Please include the following information:
- SOLID communication DLLs used: version and size
- other communication DLLs used: version and size
- description of the network configuration
Copyright © 1992-1997 Solid Information Technology Ltd All rights reserved.