Re: Does it make sense to have 2 unique keys in one table?
Posted in 1995
Topics: Performance & Tuning
In <44sig8$ggv@ulowell.uml.edu> dchan@dragon.cpe.ulowell.edu (Empty) writes: > >if the columns are partially duplicated, like > >unique key1 unique key2 >column1 column3 >column2 column4 >column3 >column4 > >does this make sense? > >-- Bill If key1 and key2 are different values, you might have a choice. If you have an issue with storage capacity, the structure you show above would not be the best. If, however, your biggest issue was performance across a LAN/WAN backbone, this structure may be better than the structure where your second table would contain "unique key2" and a single column of "unique key1". This second method would allow you to use table2 as a "pointer" to the actual data in table1 but it requires two hits against the backbone at a minimum. The structure you have outlined would probably take up more storage but it would only require a single hit to either table based on what unique key column you had available.