Index Enhancements   «Prev  Next»

Rebuilding Defragmenting Indexes Online- Exercise

Rebuilding and defragmenting indexes online


Course project: Rebuilding an index online


Objective: Rebuild the descending index you created and leave the table online.

Exercise scoring


This exercise is worth 10 points.

Background/overview

In this exercise, you will rebuild the descending index you created in the previous exercise because many new rows have been added to the table and many rows representing older sales have been deleted. You want the SALE_HEADER table to remain available while you rebuild the index.

Fact File


Review the fact file to find out more information about the House-O-Pets and its Oracle database. Click the View Tables link below to see the contents of the tables in the House-O-Pets database.
View Tables Link

Download files


You can download a correct version of the script for this exercise, descindreb.sql, from the Resources page.

Scenario

You have seen the performance of the descending index that you built for the House-O-Pets Sales Department decrease over time. You want to see whether rebuilding the index will improve the performance of the index, but you don't want to have to disrupt the use of the index while it is being rebuilt.

Instructions

Write a script to rebuild the descending index IDX_SALE_DATE_DESC you built in the previous exercise.

Hints

The keyword to allow the table to remain online comes at the end of the SQL command.

Submitting your exercise

Type (or cut and paste) your plan into the box below to submit your answers . Click the Submit button when you are finished to submit the exercise. Remember to submit all of your answers at once.