Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dumb Question regarding Indexes

Re: Dumb Question regarding Indexes

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 29 Jul 2005 09:16:34 -0700
Message-ID: <1122653765.484188@yasure>


Perm wrote:
> I am a bit confused about creating indexes. If I have a table with 5
> columns, do I create an index for each column, or create an index for
> all columns in the same index, or what??
>
> I have noticed some applications create multiple indexes for a certain
> table, each containing 1 or more columns from the table, and some
> indexes contain the same columns as others...
>
> Thx for any info.
> BP

<RANT>
You do no such thing.

What you do is go to http://tahiti.oracle.com Look up Indexes and read the concept books

Indexes serve one and only one purpose in a database unless they have been built as part of constraint creation such as a PK or UC. That is to speed up a DML statement.

You have no Oracle version
You have no Explain Plan
You have no trace file
You have no WHERE clause
You have no basis to even discuss creating any index whatsoever

The first question that should be on the table is are there already indexes created by a primary key or unique constraint?

You should seriously consider taking a beginning Oracle class. </RANT>

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Jul 29 2005 - 11:16:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US