O'Reilly logo

RavenDB High Performance by Brian Ritchie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Efficiently accessing documents

When a document is loaded from RavenDB, all of the data is retrieved at once. In many cases, this is extremely optimal. For example, when we need to render the invoice in our hypothetical accounting system or a page in our Wiki, it only requires one request to the database. In the relational model, it would have taken multiple queries or joins that duplicate data.

The fastest way to load a document is to retrieve it by key. When retrieving by key, RavenDB can go directly to the data store and pull the document out quickly. Your data model should be designed to match the key used within the application code to the key used in the database. For example, in an ASP.NET MVC application the URL route can correspond directly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required