You are here: Configuration > Client Configuration > Prefetch Object Count

Prefetch Object Count

In a client server scenario, network latency is one of the biggest performance concerns. Instead of making lots of little requests, it's more to do bulk operations. A good way is to prefetch objects which are maybe required later.

The prefect count configures how many objects of a query-result are loaded from the server. Prefetched objects avoid additional roundtrip's to the server for getting the data. However more data needs to be sent to the clients.

IClientConfiguration configuration = Db4oClientServer.NewClientConfiguration();
configuration.PrefetchObjectCount = 500;
ClientConfigurationExamples.cs: Configure the prefetch object count
Dim configuration As IClientConfiguration = Db4oClientServer.NewClientConfiguration()
configuration.PrefetchObjectCount = 500
ClientConfigurationExamples.vb: Configure the prefetch object count

The prefetch depth and the prefetch object count are closely related to each other. The prefetch object count configures how many objects are prefetched from a query-result. The prefetch-depth configures how deep the object-graph is fetched.