|
|
Archives of the TeradataForum
Message Posted: Thu, 04 Dec 2003 @ 10:34:47 GMT
Subj: | | Primary Index |
|
From: | | Dennis Havez |
Hie All,
Is someone knows what's happen if I compare a table with 15 attributs which will be Primary Index and Primary Key of the table (Ex1) and
on the other hand a Table with 15 attributs with just 2 or 3 PI (which will be used for join other table) and a constraint Primary Key on
the attributs (Ex2) ?
Ex1.
CREATE TABLE test
(
id1 INTEGER,
id2 INTEGER,
id3 INTEGER,
...
id13 INTEGER,
id14 INTEGER,
id15 INTEGER
)
UNIQUE PRIMARY INDEX (id1, id2, id3 ..., id13, id14, id15)
Ex2.
CREATE TABLE test
(
id1 INTEGER,
id2 INTEGER,
id3 INTEGER,
...
id13 INTEGER,
id14 INTEGER,
id15 INTEGER,
PRIMARY KEY(id1, id2, id3 ..., id13, id14, id15)
)
UNIQUE PRIMARY INDEX (id1, id2, id3)
Do you know what is the best solution in the case where the table contient more 100 millions rows ?
That's a lot,
Denis
| |