Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

ss

Oracle Tips by Burleson 

Indexing Foreign Keys

We talked about foreign keys and how they enforced a parent child relationship.  One problem with foreign keys is that when you UPDATE/INSERT to the child column, you must scan the parent column to validate the key.  If the parent is not a primary key, this can result in constantly reading the entire table to validate the child value.  Placing an index on the parent column will allow the foreign key to validate the child with the index, avoiding the costly full table scan. 

When you start designing your database, you need to develop a naming scheme.  This will allow you to determine the function of objects in the database.  Tables are pretty easy, but indexes are normally left out.  You should name each object so that you know what it does.  The emp_job_fdx index could be the index on the emp_job_fk constraint.  A primary key index could be name_pk, a unique index name_udx. 

Sometimes, you can find that the database over indexes, causing performance problems on INSERTs and UPDATEs.  You must determine which indexes you can remove to improve performance.  If you unknowingly delete an index on a foreign key, the performance impact may be drastic.  By using a logical naming convention, you will know by the object name why you placed it into the database in the first place. 


The above book excerpt is from:

Easy Oracle SQL

Get Started Fast writing SQL Reports with SQL*Plus

ISBN 0-9727513-7-8

John Garmany 

http://www.rampant-books.com/book_2005_1_easy_sql.htm

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks