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
In some situations it might be better to create an index than to maintain one. For example, if you're planning to load a lot of data then it might be faster to create the indexes after the data is loaded. This applies to primary and foreign keys as well because indexes are automatically created for them.
Another example is a big expensive query that could benefit from an index but that same index will cause problem with updates. If the query is only used occasionally then it might pay to create the index every time and drop it after the query is finished.
Figure 22 compares the time spent to load one table from another (INSERT SELECT) before and after an index is created. If the database cache is small then it's faster to load the data first and then create the index. On the other hand if the database cache is larger than the amount of data being processed then it's faster to load the data while the index exists.
Figure 22 - CREATE INDEX Before And After INSERT
|
[Home] | [Table of Contents] | [Previous Section] | [Next Section] |