oracle index for string column - does format of data affects quality of index?
- by Jayan
We have following type of "Unique ID" column for many tables in the database (Oracle). It is a string with following format
<randomnumber>-<ascendingnumber>-<machinename>
So we have some thing like this
U1234-12345-NBBJD
U1234-12346-NBBJD
U1234-12347-NBBJD
U1234-12348-NBBJD
U1234-12349-NBBJD
The UID value is unique, we have unique index on them. Does the following format is more efficient than above for index scans?
NBBJD-U1234-12345
NBBJD-U1234-12346
NBBJD-U1234-12347
NBBJD-U1234-12348
NBBJD-U1234-12349