1

We're evaluating whether to use RavenDB for handling XML documents of varying sizes. In our use cases, the performance of retrieving documents is far more important than that of storing documents.

We're using the embedded version of RavenDB, because we're running a standalone Windows application - I don't know if that has a negative impact on performance ?

In our tests, retrieving larger XML documents (e.g. 2.5Mb) seems to be quite slow - even when storing them in RavenFS.

We've tried to run some comparison tests, and here are the results:

-Reading directly from an on-disk XML file: ~20ms
-Reading from RavenDB (RavenFS): ~400ms
-Reading from RavenDB (string property in DocumentStore): ~500-600ms
-Reading as binary data from an embedded relational database (SQL-CE4): ~75ms

We were expecting RavenDB to be slower than accessing a file directly, but we're quite surprised that even when using RavenFS, it's still 5 times slower than using a relational database.

Are we missing something, or is it simply because RavenDB is designed for different use cases ?

TIA,
Kenneth

cyberlobe
  • 1,783
  • 1
  • 18
  • 30
Morph
  • 11
  • 1
  • RavenDB is a database and, as such, is not normally a good solution for storing large files. If that is your primary requirement, then use a dedicated tool for the job (blob storage or the file system for example). That said, if you are using RavenDB, then you should be using [attachments](http://ravendb.net/docs/article-page/2.5/csharp/client-api/attachments) to store files. – Tim Rogers Mar 23 '15 at 13:39
  • Thanks for your reply :) Actually, I thought the "RavenFS" in version 3.0 was a better alternative than attachments? – Morph Mar 23 '15 at 14:28
  • 1
    The motivation for using a database instead of e.g. the file system was to gain some of the additional advantages like compression, encryption etc without having to do additional work. We would also like to have some of the smaller documents as well as metadata for the larger documents being stored in the DocumentStore to enable querying. Btw, the relational database that we measured against is also a database but still has a lot better performance. – Morph Mar 23 '15 at 14:33

0 Answers0