Send entire list or just a page to the client?
<p>I've been retrieving data from the <strong>database</strong> and <strong>paging</strong> it based on a <strong>filter</strong> primarily sent by the client via <code>HttpPost</code>. To make myself as clear as possible, I'll give an example:</p>

<ol>
<li>The user (client side) opens a <strong>customer search</strong> page;</li>
<li>Server receives the initial request and <strong>queries</strong> a list of <strong>all</strong> customers, filtering the <strong>first 20</strong> and only returning a list with these 20 rows, a <strong>page index</strong> and the <strong>total rows count</strong> back to the client;</li>
<li>The client receives the 20 rows, the page index and rows count. The <code>HTML</code> is rendering in such a way that there will be a table with a footer which contains paging, accordingly to the rows count;</li>
<li>Once the user clicks on a link to another page on the footer, the server receives the new request and do the same query as before, but now <strong>skips</strong> the first 20 results.</li>
</ol>

<p>The performance was satisfying so far, when the only bottleneck was that waiting could be quite a bit from page browsing.</p>

<p>But now it became a problem because I want to implement a search that updates upon insertion. User types a character and the result is filtered to match whatever is contained in that Textbox.</p>

<p>What can I do about that? Should I send the <strong>entire collection</strong> to the client?</p>

<p>Am I achieving the best theoretical performance by paging <strong>before</strong> transferring data to the client?</p>