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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Index questions

Re: Index questions

From: Robert Goold <robert_at_rgoold.spamnot.freeserve.co.uk>
Date: Sat, 19 Feb 2000 08:55:21 GMT
Message-ID: <38adb9c0.4338360@news.compuserve.com>


The USING INDEX option of the CONSTRAINT clause. I usually define my primary key with an alter table statement - something like:

alter table users add constraint users_pk primary key (u_id)   using index tablespace indextablespacename;

Robert

On 15 Feb 2000 21:27:13 GMT, kirk_at_kaybee.org wrote:
>Okay, so just to be clear, this table already has an index on the
>u_id field, as it is labeled as a primary key?
>
>CREATE TABLE users (u_id INT PRIMARY KEY NOT NULL, u_name VARCHAR2(20)
> NOT NULL, u_index INT NOT NULL);
>
>If I understand things correctly, for ideal performance, index data
>should be on a seperate drive from the actual table data, correct?
>Normally, when creating other indexes, you would just put the index in a
>seperate tablespace (with files on a seperate drive) than the tablespace
>for the table, right? How would you specify an alternate tablespace for
>the automatic index on the primary key?
>
>--
> Kirk Bauer -- CmpE, Georgia Tech -- kirk_at_kaybee.org -- Avid Linux User
> GT Sport Parachuting Club! http://cyberbuzz.gatech.edu/skydive
> Opinions expressed are my own, but they should be everybody's.
Received on Sat Feb 19 2000 - 02:55:21 CST

Original text of this message

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