Sum Sybase Logical IO

From EggeWiki
Revision as of 20:12, 19 January 2010 by Brianegge (talk | contribs) (Created page with 'In performance tuning complex Sybase queries, I usually keep an eye on the total logical IO. I've created the following one-liner to be used from within sqsh to sum up the logic…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In performance tuning complex Sybase queries, I usually keep an eye on the total logical IO. I've created the following one-liner to be used from within sqsh to sum up the logical IO.

<geshi lang="ruby"> | ruby -pe 'BEGIN{@sum=0}; if $_ =~ /logical reads: \(regular=\d+ apf=\d+ total=(\d+)\)/ then @sum += $1.to_i; end; END{puts "TOTAL = #{@sum}" }' </geshi>

This requires set statistics io on; and optionally set showplan on;