Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is RavenDb performance better in comparison to relational databases? [closed]

What are the factors which make RavenDb (as an example of NoSQL document database) more efficient in comparison to relational databases?

I know two factors:

  1. All queries are executed on indexes. But you can do it in RDBMS
  2. Indexes are updated on background threads (causing missynchronization). Yep, it is a good point but I doubt it is very significant.

Actually I thought the biggest performance boost is absense of joins but looks like Multi Maps / Reduce Index is pretty similar to join.

So what factors do make RavenDb more efficient?

like image 269
SiberianGuy Avatar asked Oct 14 '11 15:10

SiberianGuy


People also ask

Which is faster relational or non relational database?

NoSQL is faster than relational database management system because it uses different data structure compared to relational databases. Cassandra data structure is faster than relational database structure. NoSQL databases are mainly used in Bigdata and real time web applications.

Why NoSQL databases are faster?

In this case, a particular data entity is stored together and not partitioned. So performing read or write operations on a single data entity is faster for NoSQL databases as compared to SQL databases.

Is RavenDB open source?

RavenDB is an open-source fully ACID document-oriented database written in C#, developed by Hibernating Rhinos Ltd. It is cross-platform, supported on Windows, Linux, and Mac OS. RavenDB stores data as JSON documents and can be deployed in distributed clusters with master-master replication.

Why are relational databases better than NoSQL?

Relational Database has a fixed schema. NoSQL Database is only eventually consistent. NoSQL databases don't support transactions (support only simple transactions). Relational Database supports transactions (also complex transactions with joins).


1 Answers

Idsa, There are several reasons why you would typically see a RavenDB application much faster than a Relational DB application.

a) As Daniel mentioned, the difference in data modeling is significant. It means that you can load the data in a much cheaper way.

b) You always query on indexes. That is important, because it means that the query plan for RavenDB is always an INDEX_SEEK. Sure, you can try doing that using RDBMS, but in many cases, you don't always hit an index. In particular, you usually have to do a lot more work to get there, and then you have to use joins and other stuff to get the data out, which again complicates the query plan.

c) RavenDB will work behind the scenes to optimize itself on your behalf. The more you use it, the more it will optimize itself to your usage pattern.

d) You never do any computation whatsoever during the queries. That is critical, because it means that things like aggregation queries, for example, are already precomputed, so they are really cheap.

like image 64
Ayende Rahien Avatar answered Sep 28 '22 17:09

Ayende Rahien