I have a question regarding DataBase design.
I have a Entity Table named: CARS
and
I have a Lookup Table named: COLORS
Table CARS has: Id, Name
and
Table COLORS has just: ColorName
Table COLORS has a short list of colors, instead CARS could have a long list of entities.
CARS has a Primary Key on ID.
My questions are:
- Adding a Primary Key on Lookup Table COLORS on ColorName, could improve performance?
Table CARS will have a CLUSTERED INDEX on ID.
- Would you make sense have a CLUSTERED INDEX on CARS on ColorName
Thanks gus for your time!
Clustered indexes can increase the speed of retrieval or inserts, but only when the data is retrieved or updated/inserted in the order that matches the index order.
Otherwise it can decrease performance.
For more detailed answer the question needs to be more specific.