Operating-system timing commands

Your operating system typically has a utility that you can use to time a command. You can often use this timing utility to measure the response times to SQL statements that a DB-Access command file issues.

UNIX Only

If you have a command file that performs a standard set of SQL statements, you can use the time command on many systems to obtain an accurate timing for those commands.

The following example shows the output of the UNIX time command:
time commands.dba
...
4.3 real          1.5 user              1.3 sys 

The time output lists the amount of elapsed time (real), the user CPU time, and the system CPU time. If you use the C shell, the first three columns of output from the C shell time command show the user, system, and elapsed times, respectively. In general, an application often performs poorly when the proportion of system CPU time exceeds one-third of the total elapsed time.

The time command gathers timing information about your application. You can use this command to invoke an instance of your application, perform a database operation, and then exit to obtain timing figures, as the following example illustrates:
time sqlapp
   (enter SQL command through sqlapp, then exit)
10.1 real          6.4 user           3.7 sys

You can use a script to run the same test repeatedly, which allows you to obtain comparable results under different conditions. You can also obtain estimates of your average response time by dividing the elapsed time for the script by the number of database operations that the script performs.


Copyright© 2018 HCL Technologies Limited