title: Calling SKIP() in code or using TOP in function
body: <p>I'm coding an application with Entity Framework in which I rely heavily on user defined functions. </p>
  
  <p>I have a question about the best way (most optimized way) of how I limit and page my result sets. Basically I am wondering if these two options are the same or one is prefered performance wise.</p>
  
  <p>Option 1.</p>
  
  <pre><code>//C#
  var result1 = _DB.fn_GetData().OrderBy(x =&gt; Id).Skip(page *100).Take(100).ToList();
  
  // SQL in fn_GetData
  SELECT * FROM [Data].[Table]
  </code></pre>
  
  <p>Option 2.</p>
  
  <pre><code>//C#
  var result2 = _DB.fn_GetData(page = 0, size = 100).ToList();
  
  // SQL in fn_GetData
  SELECT * FROM [Data].[Table]
  ORDER BY Id
  OFFSET (size * page) ROWS FETCH NEXT size ROWS ONLY
  </code></pre>
  
  <p>To me these seem to be producing about the same result, but maybe I am missing some key aspect.</p>