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:
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?
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.
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.
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.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With