Index Insanity: How to Avoid Database Chaos
In early October, Oracle ACE and IDERA senior product manager Bert Scalzo joined Dr. Robin Bloor and Dez Blanchfield of The Bloor Group to discuss database optimization and indexes in a session called Index Insanity: How to Avoid Database Chaos. Early relational databases had a simple design, but not many ways to optimize them. These days, databases are more complex and have many functions, and the most important function, according to Robin, is query optimization. The optimizing capability of database has grown significantly and is still growing, with multiple parameters to consider.
There can be a lot of reasons why database performance seems slow – multiple potential bottlenecks can exist, such as CPU, memory, locking, and network overhead. If you’re going to tune a database, you have to balance the impact between the various bottlenecks. Of course, bad database design or bad program design can be key factors, along with load balancing, capacity planning, and data layer issues.
Robin noted that, in general, Oracle requires more DBA attention than other platforms, because it has so many features. This also means that monitoring and tuning an Oracle database is not simple, since there are many parameters that must be considered, such as portioning. Consequently, DBAs need effective tools to help them manage these tasks.
Dez added that database indexes have also become more complex, and require special skills or knowledge to manage. Some organizations just try to deal with it by adding more hardware to the problem, with more processor cores or RAM or storage arrays. But these only provide short-term relief and can’t really resolve tuning problems.
“Database indexing for improved performance is a standard industry practice,” said Dez. “Database administrators often consider indexes to be the single most critical tool for improving database performance.” There are several common approaches, such as linear unordered, binary sorted, b-tree, bitmap, and hash. Two key criteria are average search time and maximum search time. There are very few DBAs who can manually manage database index performance tuning in today’s environments. The number of databases in the company and the complexity of those databases are such that a DBA must leverage the right tools to manage them, diagnose the performance issues, and deliver optimal performance tuning. The right tool can help the DBA look at the queries, data movement, database structures, and related performance parameters.
Oracle index design in particular is not as easy as it once was. IDERA’s Bert Scalzo says that DBAs have to perform some trial-and-error for index design, because the effect of an index can’t be known until it is implemented. With over a dozen different index options, partitioning becomes much more challenging. With choices to make about whether to partition tables or indexes, and the implications of those choices, the decision path gets complex quickly. And there are additional considerations and constraints, such as whether you can use reverse order indexes, unique indexes, and others. In order to navigate these options, you need a good tool, along with the discipline to do analysis and planning through the trial-and-error process to implement, test, and modify indexes as needed. Query performance may be orders of magnitude better using one choice over another.
There is a reason why so many index types exist. Keep in mind that what works in one environment is not likely to work in another. Each one needs to be optimized independently. Platform-specific features such as Oracle’s invisible indexes can come in handy, but won’t apply to other database types. IDERA’s DBArtisan database management tool provides DBAs with the ability to analyze performance issues and identify areas for performance improvement, for Oracle and other major DBMS platforms, including many platform-specific features. DBArtisan provides a consistent interface for working with indexes for multiple platforms, with the platform-specific details being handled behind the scenes. Learn more about DBArtisan and try it for free for 14 days to see for yourself how powerful it is.