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
A WHERE clause with an OR operator may cause SQL Anywhere to use only one index when two are available, or worse, to scan the whole table. Figure 20 shows that breaking a query into two SELECTs with a UNION operator can make it run ten times faster. In this case a UNION ALL offers no further benefits but because it does eliminate the temporary table it might speed things up if the result set was larger.
Figure 20 - UNION Is Faster Than OR
|
[Home] | [Table of Contents] | [Previous Section] | [Next Section] |