# Performance Evaluation of NoSQL Document Databases: Couchbase, CouchDB, and MongoDB
## 5 Experimental Results
### Discussion of the Results  
Figure 6 shows, in logarithmic scale, the total values for 100,000, 1,000,000, and 10,000,000 records used in the three document databases. From this, we can conclude that:  
* With 100,000 and 1,000,000 records, MongoDB was the database that had the shortest runtime. However, when using 10,000,000 records, CouchDB had the shortest runtime, followed by MongoDB and Couchbase;
* MongoDB had the worst runtime in workload E. On the other hand, Couchbase had the worst runtime using workloads A, E, and F. The operations that compose these workloads are scan in workload E, and read-modify-write in workload F; \begin{table}
\begin{tabular}{c c c c} \hline \hline
**MongoDB** & **100,000 Records** & **1,000,000 Records** & **10,000,000 Records** \\ \hline
1 Thread & 297.30 s & 8883.50 s & 197,138.39 s \\
3 Threads & 137.85 s & 6107.59 s & 151,164.85 s \\
6 Threads & 115.41 s & 5609.53 s & 141,708.75 s \\ \hline \multirow{2}{*}{Total} & 550.56 s & 20,600.62 s & 490,011.99 s \\  & (9.18 min) & (343.34 min) & (8166.87 min) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Runtime of MongoDB. * It was verified that the three document databases present good scale-up when moving from one to three threads. When moving from three to six threads, MongoDB presents the worst scale-up, especially when increasing the workload size;
* In some cases, CouchDB performed better than MongoDB, particularly when switching from three to six threads and also when using a large number of records, where the difference between runtime was greater. Table 8 shows the total values for all records used in the three document databases. CouchDB always had worse runtime using 100,000 and 1,000,000 records compared to MongoDB. When using 10,000,000 records, CouchDB had better runtime than MongoDB. This is because CouchDB shows better scale-up when increasing from three to six threads, unlike MongoDB. As we increased the number of records and the number of threads, CouchDB continued to maintain its performance, while MongoDB decreased its performance, causing the runtime to be lower on CouchDB than on MongoDB. Even though initially, with one thread, MongoDB had a better runtime than CouchDB. Figure 6: Log runtime representation, in seconds, of Couchbase, CouchDB, and MongoDB. Another important factor that contributed to this outcome was workload E, which results are presented in Figure 7, using a logarithmic scale. Table 9 presents the total runtime of workload E employing the three databases. These results show that MongoDB took a long runtime in all workload E experiments, with a total of 6955.74 min. Moreover, CouchDB took 2247.30 min. This means that CouchDB had a runtime of 3.10 times faster than MongoDB, running workload E. MongoDB took approximately 5 days to run workload E. In contrast, CouchDB and Couchbase took about a day and a half to run the workload E. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Couchbase** & **CouchDB** & **MongoDB** \\ \hline \multirow{2}{*}{Total} & 810,397.40 s & 445,228.30 s & 510,909.90 s \\  & (13,506.62 min) & (7420.47 min) & (8515.16 min) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Runtime of all records used of Couchbase, CouchDB, and MongoDB. Figure 7: Log runtime representation, in seconds, of workload E.  
Figure 8 shows the runtime using a logarithmic scale of all the workloads except workload E for the three sets of records. Table 10 presents the total runtime of all workloads except workload E. We removed workload E data because it is the only workload that has scan operations. With this selection, it is now possible to have an overview of all remaining operations, such as reading, updating, and inserting. As can be seen, MongoDB is the database with the lowest runtime, followed by CouchDB and Couchbase. This led to the conclusion that:  
* MongoDB has a 3.28 times faster runtime than CouchDB;
* MongoDB has a 7.00 times faster runtime than Couchbase;
* CouchDB has a 2.13 times faster runtime than Couchbase.