Tuning SQL for Optimal Performance - Sybase
Tuning SQL for Optimal Performance - Sybase
Tuning SQL for Optimal Performance - Sybase
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Manual Approach – <strong>SQL</strong> <strong>Tuning</strong>• Time the alternatives in I<strong>SQL</strong>i<strong>SQL</strong>SET STATISTICS IO ONGOSET STATISTICS TIME ONGOSELECT *FROM EMPLOYEEWHERE EMP_ID > 73712GOSET STATISTICS IO OFFGOSET STATISTICS TIME OFFGOServer Message: Number 3631, Severity 10Line 1:Total actual I/O cost <strong>for</strong> this command: 0.Total writes <strong>for</strong> this command: 0Server Message: Number 3631, Severity 10Line 1:Total actual I/O cost <strong>for</strong> this command: 0.Total writes <strong>for</strong> this command: 0Execution Time 0.<strong>SQL</strong> Server cpu time: 0 ms. <strong>SQL</strong> Server elapsed time: 3614 ms.Parse and Compile Time 0.<strong>SQL</strong> Server cpu time: 0 ms.Table: EMPLOYEE scan count 1, logical reads: (regular=1030 apf=0 total=1030),physical reads: (regular=0 apf=0 total=0), apf IOs used=0Server Message: Number 3631, Severity 10Line 1:Total actual I/O cost <strong>for</strong> this command: 2060.Total writes <strong>for</strong> this command: 0Execution Time 16.<strong>SQL</strong> Server cpu time: 1600 ms. <strong>SQL</strong> Server elapsed time: 7730 ms.(18371 rows affected)Parse and Compile Time 0.<strong>SQL</strong> Server cpu time: 0 ms.Execution Time 0.<strong>SQL</strong> Server cpu time: 0 ms. <strong>SQL</strong> Server elapsed time: 0 ms.Parse and Compile Time 0.<strong>SQL</strong> Server cpu time: 0 ms.