We recently launched Siaqodb 5.5 which brings a brand new DocumentStore. Siaqodb is primarily a client side database, but it is also suitable to use it in ASP.NET applications as embedded database.

There are a lot of document oriented databases on the market like MongoDB, CouchDB, RavenDB, etc that can be used in ASP.NET apps, but only a few can be embedded and run in-process with the app. RavenDB is a popular document oriented database in the .NET world and it is primarily a server database but it can be also used as embedded database.

So even Siaqodb is primarily a client side database and RavenDB is primarily a server side database, there is a common ground for both: ASP.NET apps having the db engine embedded. We was really interested to compare them as performance and the comparison is even more interesting since RavenDB uses Voron – a LMDB inspired storage engine and Siaqodb uses LMDB as storage engine.

Versions compared: Siaqodb 5.5.0.1 from Nuget and RavenDB Embedded 3.0.30037 from Nuget too.(RavenDB has two storage engines: ESENT and VORON, for this comparisons we picked VORON).

First let’s define an entity:

public class MyEntity
{
	public string Id { get; set; }
	public int IntValue { get; set; }
	public string StringValue { get; set; }
	public DateTime DateTimeValue { get; set; }
	public Guid GuidValue { get; set; }
	public double DoubleValue { get; set; }
}

And then let’s generate entities( we tested with 10k and 100k documents):


public static void GenerateEntities()
        {
            var random = new Random(DateTime.Now.Millisecond);

            for (int i = 0; i < ENTITY_COUNT; i++)
            {

                entities.Add(new MyEntity
                {
                    Id = Guid.NewGuid().ToString(),
                    IntValue = random.Next(),
                    DoubleValue = random.NextDouble(),
                    StringValue = Guid.NewGuid().ToString(),
                    DateTimeValue = new DateTime(random.Next(1999, 2015), random.Next(1, 12), random.Next(1, 28)),
                    GuidValue = Guid.NewGuid()
                }
                );
            }
        }

INSERT 10K and 100K documents, here is the result:

insert

READ all 10K and 100K documents, here is the result:

update

READ by primary key 10K and 100K documents, here is the result:

update

READ by secondary index 10K and 100K documents, here is the result:

update

UPDATE 10K and 100K documents, here is the result:

update

DELETE 10K and 100K documents, here is the result:

update

Source code is on GitHub, so you can run it yourself.

The tests were done on a machine with:

Processor: Intel i5-4200M @2.5 GHz
Memory: 8 GB
Storage: SSD Intel