Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Indexes part II
A copy of this was sent to "Cherk" <andrija.cerkez_at_lijanovici.com>
(if that email address didn't require changing)
On Mon, 22 Nov 1999 11:31:59 +0100, you wrote:
>Thank's Sybrand Bakker !
>
>I have additional questions.
>
>1. Is it true:
>
>"When I defined primary and unique key in Oracle 7, indexes on them
>is immediatly created"
>
either that OR an existing index on the columns is 'taken' over (eg: you can create a unique index on a table T column x. if you alter table t add constraint t_pk primary key(x) -- that index will be 'taken' over by the primary key constraint.
>2. May I define index on foreign key immediatly when I created table and
>defined foreign constraint, or I need to do this after with statement Create
>index ...
>
do it whenever. foreign keys do not *need* an index (but see the website in my signature for the reasons why you really do want to index foreign keys 99% of the time).
>
>----------------------------------------------------------------------------
>--------------
>I have the simplest tastes. I am always satisfied with the best.
>----------------------------------------------------------------------------
>--------------
>Cherk (andrija.cerkez_at_lijanovici.com), Siroki Brijeg, Croatia
>Cherk's home page (http://www.angelfire.com/co/Cherk)
>
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Nov 22 1999 - 06:02:22 CST