Subject | Doubt creating index |
---|---|
Author | Ruben Marti |
Post date | 2013-02-13T23:44:17Z |
I have a table with several hundreds of thousands of records that has a
composite primary key, with the fields "START_DATE" and "ITEM".
For optimization reasons, I need an index composed of the fields "ITEM" and
"START_DATE".
I honestly do not know if it's interesting declare the index as "UNIQUE"
when it can not have duplicate records.
What will I gain or loss if the index is declared "UNIQUE"?
What type (UNIQUE or NOT UNIQUE) is faster to retrieve the data?
What type (UNIQUE or NOT UNIQUE) is faster to insert the data?
What type (UNIQUE or NOT UNIQUE) is faster to update the data?
Ruben Marti.
[Non-text portions of this message have been removed]
composite primary key, with the fields "START_DATE" and "ITEM".
For optimization reasons, I need an index composed of the fields "ITEM" and
"START_DATE".
I honestly do not know if it's interesting declare the index as "UNIQUE"
when it can not have duplicate records.
What will I gain or loss if the index is declared "UNIQUE"?
What type (UNIQUE or NOT UNIQUE) is faster to retrieve the data?
What type (UNIQUE or NOT UNIQUE) is faster to insert the data?
What type (UNIQUE or NOT UNIQUE) is faster to update the data?
Ruben Marti.
[Non-text portions of this message have been removed]