webcaetano / mongo-mysql Goto Github PK
View Code? Open in Web Editor NEWMongo vs Mysql Test Performance in Nodejs
Mongo vs Mysql Test Performance in Nodejs
Ok, I ran it on my SSD virtual server on vultr.com.
1000:
mysql insert: 1214ms
mongo insert: 1401ms
mysql select: 9ms
mongo select: 326ms
10000:
mysql insert: 11557ms
mongo insert: 7751ms
mysql select: 30ms
mongo select: 2957ms
ENGINE='MyISAM' for mysql tables:
1000:
mysql insert: 361ms
mongo insert: 938ms
mysql select: 9ms
mongo select: 345ms
10000:
mysql insert: 3394ms
mongo insert: 6985ms
mysql select: 31ms
mongo select: 3080ms
So:
MongoDB queries are much faster with indexes (a query on a many millions documents collection with indexes can take less than 1 second but with no indexes many hours or even longer)
So let's compare select queries with indexes as well (MySQL has also indexes).
Could you do it?
Or can I open a PR?
(data, err) -> (err, data)
I think it's better to use MyISAM engine for MySQL to compare with MongoDB because it acts like document database.
The current repo use InnoDB engine as default.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.