OLD | NEW |
1 # Run this TCL script using "testfixture" in order get a report that shows | 1 # Run this TCL script using "testfixture" in order get a report that shows |
2 # how much disk space is used by a particular data to actually store data | 2 # how much disk space is used by a particular data to actually store data |
3 # versus how much space is unused. | 3 # versus how much space is unused. |
4 # | 4 # |
5 | 5 |
6 # Get the name of the database to analyze | 6 # Get the name of the database to analyze |
7 # | 7 # |
8 if {[llength $argv]!=1} { | 8 if {[llength $argv]!=1} { |
9 puts stderr "Usage: $argv0 database-name" | 9 puts stderr "Usage: $argv0 database-name" |
10 exit 1 | 10 exit 1 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if {$total_overflow>0} { | 102 if {$total_overflow>0} { |
103 set upp [expr {$total_unused_ovfl/$total_overflow}] | 103 set upp [expr {$total_unused_ovfl/$total_overflow}] |
104 puts " (avg $upp bytes/page)" | 104 puts " (avg $upp bytes/page)" |
105 } else { | 105 } else { |
106 puts "" | 106 puts "" |
107 } | 107 } |
108 set n_free [expr {$file_pgcnt-$total_primary-$total_overflow}] | 108 set n_free [expr {$file_pgcnt-$total_primary-$total_overflow}] |
109 if {$n_free>0} {incr n_free -1} | 109 if {$n_free>0} {incr n_free -1} |
110 puts "-- Total pages on freelist: $n_free" | 110 puts "-- Total pages on freelist: $n_free" |
111 puts "COMMIT;" | 111 puts "COMMIT;" |
OLD | NEW |