• Animal Magic (9/18/2012)


    All that PK and FK will do for you is introduce data integrity. Depending on the source of the warehouse data the creator may already know that the data is consistent and therefore doesn't need to add any extra checks. or maybe they are not too worried if a header record doesn't exist and their are orphaned child records.

    Assuming the tables are indexed i would guess that the no PK/FK is by design, but its a rather large assumption.

    Not at all true. Constraints are used by the optimizer to make choices in how it runs the queries that you submit to it. Those constraints can absolutely affect performance in a positive manner. I have a small example on my blog.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning