title: Use SQL View or SQL Query?
body: <p>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:</p>
  
  <pre><code>string query = "SELECT T1.f1, T1.f2, T2.f3 FROM table1 T1 join table2 T2" +
     "on T1.id = T2.id AND T1.dt = T2.dt ..."
  ....
  cmd.CommandText = query;
  </code></pre>
  
  <p>I could also put the query as a view on my SQL server like this:</p>
  
  <pre><code> CREATE VIEW V1 AS
     "SELECT T1.f1, ..."
  </code></pre>
  
  <p>Then I can use the view in a simplified query like this:</p>
  
  <pre><code> string query = "SELECT f1, f2, f3 FROM V1";
   ....
   cmd.CommandText = query;
  </code></pre>
  
  <p>I am not sure which way is better. Will be the view be faster then a SQL query? By the way, the query  I show here is a simplified one. The actual query SELECT is more complicated one.</p>