• John Deupree (5/2/2014)


    Can someone comment on the performance implications of using views as opposed to the tables themselves.

    Depends on how complex the views are. Simple views that just narrow and/or filter a table, fine. Couple of joins, probably fine. Lots and lots of joins, aggregation, views upon views, you're asking for performance problems. Partially from the complexity making it harder for the optimiser to find a good plan, partially from the time required to inline all the views and simplify and partially because the optimiser may decide to materialise an interim resultset due to the aggregations, sorting, etc.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass