Is it okay to have a lot of database views?

后端 未结 4 2123
忘掉有多难
忘掉有多难 2021-02-20 18:51

I infrequently (monthly/quarterly) generate hundreds of Crystal Reports reports using Microsoft SQL Server 2005 database views. Are those views wasting CPU cycles and RAM durin

4条回答
  •  一整个雨季
    2021-02-20 19:18

    The views are only going to take up cpu/memory resources when they are called.

    Anyhow, best practice would be to consolidate what can be consolidated, remove what can be removed, and if it's literally only used by your reports, choose a consistent naming standard for the views so they can easily be grouped together when looking for a particular view.

    Also, unless you really need transactional isolation, consider using the NOLOCK table hint in your queries.

    -- Kevin Fairchild

提交回复
热议问题