Chapter 3. Optimizing the API

Like any well-designed system, RavenDB's session-based API is designed to make the often used tasks simple. However, there are certain tasks that are better suited for RavenDB's specialized APIs.

In this chapter we will cover:

  • Optimizing large data loads
  • Processing large result sets
  • Getting multiple results at once
  • Patching documents instead of replacing them
  • Built-in caching capabilities

Optimizing large data loads

When loading large amounts of data, there is a certain overhead with the standard API that becomes expensive. RavenDB 2.0 introduced a bulk insert API to solve this problem. It is usually orders of magnitude faster than sending batches through the standard API. This optimized approach does come with a few limitations ...

Get RavenDB High Performance now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.