title: SQL Query with parameter taking time
body: <pre><code>declare @Id varchar(9)
  set @Id='1'
  select *  from vw_testview where id=@Id
  </code></pre>
  
  <p>The above query is called in a procedure and is taking about 4 seconds to execute, where as the following query when run individually executes in 0 seconds</p>
  
  <pre><code>select * from vw_testview 
  where id='1'
  </code></pre>
  
  <p>Could some one please me help with this, i need to decrease the execution time for the first query</p>