Skip to Content
Oracle Database 11gR2 Performance Tuning Cookbook
book

Oracle Database 11gR2 Performance Tuning Cookbook

by Ciro Fiorillo
January 2012
Intermediate to advanced
542 pages
11h 28m
English
Packt Publishing
Content preview from Oracle Database 11gR2 Performance Tuning Cookbook

Exploring index skip-scan and index range-scan

In this recipe, we will see how to use composite indexes and also the difference between index skip-scan and index range-scan operations.

Getting ready

For this recipe, we will use a copy of the CUSTOMERS table in the SH schema and SQL*Plus to execute our tests.

How to do it...

The following steps will demonstrate index skip-scan and index range-scan:

  1. Connect to SH schema:
    CONNECT sh@TESTDB/sh
    
  2. Create MY_CUSTOMERS table as a copy of CUSTOMERS:
    CREATE TABLE sh.MY_CUSTOMERS AS
      SELECT * FROM sh.CUSTOMERS NOLOGGING;
    
  3. Create an index on the MY_CUSTOMERS table based on multiple fields:
    CREATE INDEX sh.CUSTOMERS_IXMULTI ON sh.MY_CUSTOMERS
      (CUST_GENDER, CUST_YEAR_OF_BIRTH, CUST_FIRST_NAME);
    
  4. Compute statistics ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 11g Performance Tuning Recipes: A Problem-Solution Approach

Oracle Database 11g Performance Tuning Recipes: A Problem-Solution Approach

Sam R. Alapati, Darl Kuhn, Bill Padfield

Publisher Resources

ISBN: 9781849682602Other