Oracle Data Warehouse Tuning for 10g

The chapter begins Part II of this book, which focuses on aspects of Oracle SQL code provided specifically for tuning of data warehouse type functionality. In order to introduce aspects of tuning SQL code for data warehouses, it is necessary to go back to basics. This chapter will provide three things: (1) details of the most simplistic aspects of SQL code tuning, (2) a description of how the Oracle SQL engine executes SQL code internally, and (3) a brief look at tools for tuning Oracle Database. It is essential to understand the basic facts about how to write properly performing SQL code and perform basic tuning using Oracle internals and simple tools. Subsequent chapters will progress to considering specific details of tuning SQL coding for data warehouses.
Perhaps one of the most important rules of thumb for coding well performing SQL code statements and particularly queries, those most subject to tuning is what is commonly known as the KISS rule: Keep It Simple, Stupid! The simpler your SQL statements are, the faster they will be. There are two reasons for this. First, simple SQL statements are much more easily tuned by a programmer: second, the optimizer will function a lot better when assessing less complex SQL code. The negative effect of this is granularity, but this negative effect depends...