<html> <head> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Prefetching Objects For Query Results</title> <link rel="stylesheet" type="text/css" href="../../../style.css"> </head> <body> <div class="CommonContent"> <div class="CommonContentArea"> <h1>Prefetching Objects For Query Results</h1><div id="TOC"><div id="TOCinner"><span class="TOCtitle">Contents</span><div class="TOCcontents"><ul><li><a href ="#Advantage">Advantage</a></li><li><a href ="#Effect">Effect</a></li></ul></li></ul></div></div></div> <span name="cs_wiki_filter" csw_filters="net"> <p>.NET:</p> <p><code>void ClientServerConfiguration.PrefetchObjectCount(int prefetchObjectCount);</code></p> </span> <p>Sets the number of objects to be prefetched for an ObjectSet in C/S mode. </p> <a name="Advantage"></a><h2>Advantage</h2> <p>PrefetchObjectCount setting allows to tune the way object results are delivered from the server.</p> <a name="Effect"></a><h2>Effect</h2> <p>Long query results can take significant time to be transferred from the server to the client. This can lead to blocking communication channel. In order to prevent this, query results are fetched from the server in portions. The default portion size is 10 objects. </p> <p>PrefetchObjectCount setting allows you to change the default prefetched amount.</p> <p>prefetchObjectCount = 1 will enforce the client to send a request for each next object in the result set. This can be used to improve the performance for large objects.</p> <p>With the default setting(10) the client receives the first 10 objects, the next 10 will be delivered on the first request.</p> <p>Bigger values of prefetchObjectCount can improve the performance for small objects when the whole result set is required for immediate processing on the client.</p> <p>PrefetchObjectCount setting also influences the processing of queries in lazy and snapshot modes.</p></div> </div> <div id="footer"> This revision (2) was last Modified 2007-03-08T19:35:23 by Tetyana. </div> </body> </html>