OLD | NEW |
1 # Run this TCL script using "testfixture" to get a report that shows | 1 # Run this TCL script using "testfixture" to get a report that shows |
2 # the sequence of database pages used by a particular table or index. | 2 # the sequence of database pages used by a particular table or index. |
3 # This information is used for fragmentation analysis. | 3 # This information is used for fragmentation analysis. |
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 | 8 |
9 if {[llength $argv]!=2} { | 9 if {[llength $argv]!=2} { |
10 puts stderr "Usage: $argv0 database-name table-or-index-name" | 10 puts stderr "Usage: $argv0 database-name table-or-index-name" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 set csr [btree_cursor $DB $rootpage 0] | 140 set csr [btree_cursor $DB $rootpage 0] |
141 for {btree_first $csr} {![btree_eof $csr]} {btree_next $csr} { | 141 for {btree_first $csr} {![btree_eof $csr]} {btree_next $csr} { |
142 page_info $csr 0 | 142 page_info $csr 0 |
143 set i 1 | 143 set i 1 |
144 foreach pg [btree_ovfl_info $DB $csr] { | 144 foreach pg [btree_ovfl_info $DB $csr] { |
145 puts [format {OVFL %3d: %6d} $i $pg] | 145 puts [format {OVFL %3d: %6d} $i $pg] |
146 incr i | 146 incr i |
147 } | 147 } |
148 } | 148 } |
149 exit 0 | 149 exit 0 |
OLD | NEW |