Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Oracle Database 11gR2 Performance Tuning Cookbook

You're reading from  Oracle Database 11gR2 Performance Tuning Cookbook

Product type Book
Published in Jan 2012
Publisher Packt
ISBN-13 9781849682602
Pages 542 pages
Edition 1st Edition
Languages
Author (1):
Ciro Fiorillo Ciro Fiorillo
Profile icon Ciro Fiorillo

Table of Contents (21) Chapters

Oracle Database 11gR2 Performance Tuning Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Starting with Performance Tuning Optimizing Application Design Optimizing Storage Structures Optimizing SQL Code Optimizing Sort Operations Optimizing PL/SQL Code Improving the Oracle Optimizer Other Optimizations Tuning Memory Tuning I/O Tuning Contention Dynamic Performance Views A Summary of Oracle Packages Used for Performance Tuning Index

Indexing the correct way


When a table grows in size, it's very difficult and time-consuming to find the data we need by scanning the entire table data.

The well-known solution to this problem is indexing. We can build an index, which is a particular storage structure, to identify quickly where data is stored in the table. In the real world, indexes are often used, for example, in a book like this, so we are accustomed to using them.

In this recipe, we will see how indexes work and when to use them, and we'll also avoid over-indexing; we will introduce the B-tree indexes, and then look at other types of indexes and more details on their use.

How to do it...

In this recipe, we will use the CUSTOMERS table of SH schema. There are more than 55000 rows in the table. We will create several indexes on this table, and after the creation of each inde we will execute the following queries (we will call them TEST CASE onwards):

SET AUTOT TRACE EXP
SELECT CUST_FIRST_NAME, CUST_LAST_NAME, CUST_YEAR_OF_BIRTH...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}