Need to know IO usage in Solaris

Morning,

i am in a bit situation where in i don't know what is causing the same run to hit different time to complete

Example:
1st run took about an hour to finish and the second took around 30 - 45 mins to complete.

by the way i am executing a stored procedure using sybase.

  r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
    0.0    1.6    0.0    7.2  0.0  0.0    0.0    4.7   0   1 sd0
    0.0    1.6    0.0    7.2  0.0  0.0    0.0    4.4   0   1 sd1
    0.4    0.0   12.8    0.0  0.0  0.0    0.0   10.3   0   0 ssd6
    0.8    0.0   25.6    0.0  0.0  0.1    0.0   91.2   0   7 ssd8
    0.4    0.0   12.8    0.0  0.0  0.0    0.0   10.4   0   0 2/md10
    0.4    0.0   12.8    0.0  0.0  0.0    0.0   10.4   0   0 2/md100
    0.8    0.0   25.6    0.0  0.0  0.1    0.0   91.2   0   7 3/md10
    0.8    0.0   25.6    0.0  0.0  0.1    0.0   91.2   0   7 3/md100
    0.8    1.0   38.4    4.8  0.0  0.0    0.0    4.3   0   0 9/md10
    0.0    7.6    0.0   60.8  0.0  0.1    0.0   12.6   0   4 11/md3
    0.0    7.6    0.0   60.8  0.0  0.1    0.0   12.6   0   4 11/md300
    2.4    1.2   38.4   19.2  0.0  0.0    0.0    1.1   0   0 11/md1
    0.8    1.0   38.4    4.8  0.0  0.0    0.0    4.3   0   0 9/md101
    0.8    0.4   12.8    6.4  0.0  0.0    0.0    4.0   0   0 13/md10
    0.8    0.4   12.8    6.4  0.0  0.0    0.0    4.0   0   0 13/md100
    0.8    1.0   38.4    4.8  0.0  0.0    0.0    4.3   0   0 ssd14
    0.2    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 ssd15
    0.2    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 ssd19
    0.0    7.6    0.0   60.8  0.0  0.1    0.0   12.6   0   4 ssd20
    2.4    1.2   38.4   19.2  0.0  0.0    0.0    1.1   0   0 ssd23
    0.8    0.4   12.8    6.4  0.0  0.0    0.0    4.0   0   0 ssd39

Please help

if the 1st and 2nd runs were done exactly the same way -- same userid, same command, same parameters, same database, etc. -- you could look at the server load at during the 1st run and also check what else was running at that time that was not running during the 2nd run ...

if there was a difference in the way the 2 runs were done, you could still follow the same process as described above but then you have to account for the differences in the runs themselves ... as an example, a manager that has access to a sales database would have access to his individual team members' database profiles while those team members would only have access to their own profiles ... this would naturally make the manager's report to run longer than each team members' reports ...

I am running the same stored procedure multiple times, but i am getting different output when it comes to time completion. Below are the different elapse time:

FIRST RUN
TRD extract finished, time elapsed: 239 minutes
SECOND RUN
TRD extract finished, time elapsed: 4 minutes
SUCCEEDING RUN
2013-08-04 20:58:39.053	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 4 minutes
2013-08-02 03:27:00.233	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 65 minutes
2013-08-02 02:06:52.77	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 44 minutes
2013-08-01 23:36:43.293	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 62 minutes
2013-08-01 05:00:22.307	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 62 minutes
2013-08-01 02:44:22.15	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 48 minutes
2013-08-01 01:50:31.75	usp_art_odi_trade_extract	TRD extract finished, time elapsed: 35 minutes

is there a way for me to trace the io usage for this particular process that i am using?

use strace, lsof or truss -- depending on your os -- to track the application run ... if you have enough disk space, you can redirect the outputs of your strace/lsof/truss into files that you can analyze further ...

I am using Sun Solaris 10. Is there any other command which could output IO used by SYBASE ASE?

Thanks,

see man truss

If your disk are in a external Storage, check if your server is sharing the Storage Port with another server.

May be the another server or servers run process that use intensive IO and affect the original server if use the same Storage Port