From the Inside Flap:
Intended audience
Informix tools and engines let you quickly build powerful and reliable database applications. This alone is often not enough; users also demand high performance. It takes skill and experience to produce such high- quality systems, but many Information Systems (IS) professionals don't have the time to learn the intricacies of Informix products. Optimizing Informix Applications gives you the insight you need to produce the fast database applications your users want. Optimizing Informix Applications is a tool for application developers, database administrators, systems analysts, and system administrators who are interested in designing, developing, maintaining, and administering efficient applications that use Informix database engines and tools.
To get the most out of this book, programmers and analysts should be comfortable with:
* Basic Structured Query Language (SQL).
* A procedural programming language, such as C, COBOL, or 4GL.
Database administrators should understand:
* Relational database design concepts.
* Intermediate or advanced SQL.
* Informix engine architecture.
System administrators should understand:
* Informix engine architecture.
* The UNIX operating system at an intermediate level.
Benefits of Using This Book
Optimizing Informix Applications provides you with these benefits:
* Enhanced productivity.
It's hard for a user to be productive if a typical query takes three minutes to return data. End-of-week reports that take 36 hours to run generally don't lead to a more robust bottom line, either. In this book, we cite dozens of specific changes you can make to your applications and systems to upgrade your organization's productivity.
* Increased application reliability.
Generally, an inefficient application is an unreliable application. At the very least, slow systems are perceived as being less reliable than fast systems. When you increase a system's speed, you will improve its reliability.
* Reduced hardware expenditures.
Few organizations can afford to continually upgrade their hardware environments to get better performance. Therefore, they expect their IS staff to do more with less. You can use the suggestions in this book to squeeze extra speed out of your existing hardware.
* Simpler applications.
In many cases, the simplest solution is the fastest solution. You will find many tips in this book to help you increase a system's speed while reducing its complexity.
* More satisfied users.
In the past, most users were mainly concerned with whether a system worked; performance wasn't a major consideration. Today's users are more sophisticated than ever, and view system speed as the crucial element. Many organizations have learned this painful lesson the hard way, when users don't approve a slow system, no matter how well-designed.
How to Use This Book
This book is divided into five major sections:
1. Introduction. In this chapter, we discuss how you can best use this book, as well as how to set up the most effective optimization test environment.
2. Creating a Well-Designed Database. Your entire application relies on an efficient database design. In this chapter, we review some of the most important facets of a good database design.
3. Optimizing Application Code. This chapter describes how to write efficient database application code, using a variety of programming languages.
4. Tuning the Database Engine. Even the most efficient application can be sluggish if the underlying database engine is tuned incorrectly. In this chapter, we review many techniques you can use to make your database engine run as rapidly as possible.
5. Case Studies. This chapter contains five case studies. Each case study features several interrelated problems. You don't need to read this book from cover to cover. To get the most benefit from our suggestions, review only those sections that apply to your particular situation. For example, if you are running a distributed ESQL/C application that uses the OnLine engine, you really don't need to spend much time reading the sections about 4GL or Informix-SE.
However, there are several sections that deserve your attention, regardless of your situation. These include:
* Setting Up an Optimization Test Environment.
It is a big mistake to rush in and start making performance enhancement changes to your system without first observing a few very important details. This section covers these details.
* General Tips.
This section contains numerous suggestions that can help you develop better, faster applications, no matter what engine or tools you use.
* Relational Database Design Concepts.
A good database design is the foundation of a system that performs well. This section teaches you how to implement the relational model when you design a database. It also covers specific situations where the relational model is not appropriate.
* Indexing Strategies.
The wrong indexing strategy can wreck an otherwise perfect database design. We list some straightforward indexing techniques you can use to dramatically raise your system's throughput.
* SQL Tips.
Without SQL, you can't access data. In this section, we cite several ideas you can incorporate to improve your SQL statements.
* Case Studies.
This chapter contains a number of multi-faceted case studies. Spend some time reviewing them: chances are, you may already have experienced some of the problems we illustrate.
How to Use the Examples
You'll find numerous examples in each chapter, which we have made as clear and concise as possible. This will help you implement our suggestions quickly. Because this book is intended as a reference, the examples in one chapter do not rely on another. This will help you concentrate on specific problems and solutions. Keep in mind that while the examples in this book may not exactly match your database design, application software, and/or engine configuration, you can still apply them to your specific problems.
Setting Up An Optimization Test Environment
When faced with a sluggishly performing application, or an engine that appears out of tune, most administrators and programmers are eager to roll up their sleeves, and begin the optimizing process. Unfortunately, there are a number of potentially tiresome, yet very important steps that you must first take before you begin the "real work" of tuning. If you don't set up a stable, accurate test environment, you face the very real risk of making inaccurate judgments about the root cause(s) of your system's current woeful performance. You might then use these incorrect assumptions as the base of an entire action plan, only to later learn that your original hypotheses were wrong.
In this section, we address these important issues. We've divided the section into three major parts. The first deals with the agenda you should cover before you even begin your testing efforts. This includes ensuring that the right hardware, operating system, database, and application software are in place. In addition, we discuss some organizational issues that you should address immediately at the start of the optimization.
Next, we spell out some methods that you can use to help point the way while your testing is going on. While the most successful system testers and tuners rely heavily on their test plan to guide them during this process, they also choose the right blend of discipline and creativity when following up on new, promising performance leads.
Finally, we illustrate how you can translate the knowledge that you gained during testing process into real performance improvements.
While this section is primarily designed for people tuning existing systems and applications, you can still apply these suggestions if you're doing new development. In fact, one way to help guarantee a production system that meets your standards is to treat good performance as one of the most important development deliverables.
Steps to follow before testing
Hardware considerations
Your hardware environment really consists of a number of different components, each of which plays a meaningful role in your overall performance picture. Let's illustrate each of these components in more detail:
* CPU.
Ideally, both your production and test environment have similar CPU speeds and capacities. If not, you'll always have to wonder which numbers you should believe: those from the production system, or those from the test system. The same problem often arises at multi-processor sites, where the production machine may have 12 CPUs, while the test machine has one. This really becomes a problem if you're tuning the OnLine engine, especially if you're using OnLine 6.00 or newer.
* Memory.
It's crucial that your test platform have the same amount of memor
"About this title" may belong to another edition of this title.