Book Image

Oracle Database XE 11gR2 Jump Start Guide

By : Asif Momen
Book Image

Oracle Database XE 11gR2 Jump Start Guide

By: Asif Momen

Overview of this book

Oracle Database XE 11gR2 is an excellent beginner-level database and is a great platform to learn database concepts. "Oracle Database XE 11gR2 Jump Start Guide" helps you to install, administer, maintain, tune, back up and upgrade your Oracle Database Express Edition. The book also helps you to build custom database applications using Oracle Application Express.Using this book, you will be able to install Oracle Database XE on Windows/Linux operating system.This book helps you understand different database editions and it guides you through the installation procedure with the aid of screenshots. You will learn to interact with the database objects. You will gain a solid understanding of stored sub-programs which is followed by an introduction to Oracle Application Express (APEX). Solid database performance tuning strategies are also discussed in this book followed by backup and recovery scenarios. All in all, "Oracle Database XE 11gR2 Jump Start Guide" delivers everything that you should know to get started with Oracle Database administration.
Table of Contents (20 chapters)
Oracle Database XE 11gR2 Jump Start Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Gathering statistics


Statistics are the primary source of information for Oracle Optimizer. It is through the use of statistics that the optimizer attempts to determine the most efficient way to use resources to satisfy our query. The more accurate our statistics are, the better the optimizer's plan choice will be, and thus, the better our query performance will be.

To gather object statistics, we would use the DBMS_STATS package. The following is an example of gathering table statistics:

-- Collect table statistics and all indexes that are created on that table
SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS('hr', 'emp', estimate_percent => 100, cascade => TRUE);

The estimate_percent parameter tells Oracle to estimate statistics based on a sample. In this example, we are directing Oracle to use 100 percent of the table data to collect statistics. cascade tells Oracle to collect table statistics as well as statistics on the dependent objects, for example, indexes. TRUE means to collect...