• David Lean (3/23/2010)


    Too often lazy or inexperienced DB designers automatically create an Identity Column for PK of every table they create. And they fail to ensure the uniqueness of the FK pairs. This mistake is so common that over the past 20 years I've seen this as the root cause of a poor performing DB solutions at least 3 times each year. In all cases perf at least doubles just by correcting this mistake, In one case removing it & the massive number of duplicate relationship rows it permitted, resulted in an 80,000 times improvement in perf. Which on a 9 * Web Server to 2 * 8 way SQL system, means everything pegged & losing business, to everything idle & taking 4x number of orders.

    Quite true, but identifying and enforcing the business key in a table with a surrogate key should apply equally to every table, not just those with more than one foreign key. The problems you mention commonly apply to other tables as well.