Foxhound is the better* Database Monitor for SQL Anywhere.
*better: More thorough, more relevant, more effective.
...more Alerts, more All Clears, more details, more control in your hands.
|
[Home] | [Table of Contents] | [Previous Section] | [Next Section] |
Breck Carter
Last modified: February 12, 1998
mail to: bcarter@bcarter.com
The SQL Anywhere manual says "About the first 10 bytes of data for each index entry are stored in the index pages." What this means is that indexes made up of long columns and/or many columns can sometimes be slower than narrow indexes. This performance degradation seems to happen if SQL Anywhere must look beyond the 10th character when comparing index values.
Figure 23A demonstrates the performance difference between narrow and wide index entries. Half of the entries are much shorter than 10 bytes while the other half are longer than 10 bytes with the same data in the first 10 bytes of all of these entries. The two SELECTs show that searching on a wide index value can double the number of I/O operations and greatly increase the time required.
Figure 23A - Narrow Versus Wide Indexes
|
In the real world you often need to create indexes involving several long columns, making it impossible to avoid wide indexes all the time. The good news is that it's the data that counts, not the declared size of the columns, and wide indexes aren't necessarily a bad thing. Figure 23B shows how you can determine if there actually are any problems with wide index comparisons by repeatedly displaying the 'FullCompare' property.
Figure 23B - Display FullCompare
|
FullCompare is defined as "the number of comparisons beyond the hash value in an index that have been performed." When the first test in Figure 23B is repeatedly run the value of FullCompare changes very slowly: 60, 63, 66, 69, and so on. In the second test FullCompare increases dramatically with each run: 90, 111, 132, 153, etc. Figure 23C shows what it looks like in ISQL.
Figure 23C - Watch For Rapid FullCompare Changes With ISQL
[Home] | [Table of Contents] | [Previous Section] | [Next Section] |