Use SQL View or SQL Query?

前端 未结 9 1234
旧巷少年郎
旧巷少年郎 2021-01-17 22:46

I am working on an application to get data from a MS-SQL server (2005). In the command text, I can pass a sql query like this:

string query = \"SELECT T1.f1,         


        
9条回答
  •  囚心锁ツ
    2021-01-17 23:25

    Views aren't a performance feature. They exist to reduce the number of joins and to allow you to denormalize without actually denormalizing.

    In other words, use whichever makes your code the simplest and don't change for performance reasons unless you have good reason to do so. These kinds of optimizations usually aren't worth it.

提交回复
热议问题