Comments (6)
can you suggest api? By the way, take a look at https://github.com/sidorares/node-mysql2 - it's nearly 10 times faster and has same features (and many more). The is pooling in mysql2, same api as with node-mysql
from nodejs-mysql-native.
What does sidorares/node-mysql2 offer over felixge/node-mysql - is it speed
alone (not that that's a bad thing)?
How does sidorares/node-mysql2 compare to mysql-native for speed?
Is mysql-native discontinued in favour of mysql2? If not, I'll think about
an API.
On 17 May 2013 12:06, Andrey Sidorov [email protected] wrote:
can you suggest api? By the way, take a look at
https://github.com/sidorares/node-mysql2 - it's nearly 10 times faster
and has same features (and many more). The is pooling in mysql2, same api
as with node-mysql—
Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-18055565
.
from nodejs-mysql-native.
speed (x2 to x7 times), prepared statements, SSL, compression. Rows are compiled to proper JS objects, which means property access is very fast ( = not in a dictionary mode) I'll probably declare mysql-native discontinued in favour of mysql2. It was long due to be refactored and ended in complete rewrite. mysql-native parser is string based and byte manipulation on strings is slower than on Buffer. Also, in mysql2 I'm trying not to buffer as much as possible - if there is enough data in incoming chunk to make a packet it is processed immediately without appending to internal buffer first. mysql-native is still useful as it can be used with virtually any version of node, even with 0.1 if you add sha1 shim.
from nodejs-mysql-native.
my speed benchmarks (might be wrong, I'm biased) on air 5.1 2Ghz and local mysql 5.6
sequential selects in one connection (one row in result):
mysql-native ~ 5k selects/sec
node-mysql ~ 6-7k
node-mysql2 ~ 7-8k
mariasql ~10k
selecting large number of rows or multiple selects in many parallel connections:
mysql-native - ~ 200k rows/sec
node-mysql - 350k rows/sec
node-mysql2 - 2000k rows/sec
mariasql - 800k rows/sec
numbers given for a very small row (1-2 numeric columns, might be different for another types of data)
Also there is server protocol api so you can easily mock any mysql server behaviour.
from nodejs-mysql-native.
Thanks, I'll try mysql2 on my next project.
On 17 May 2013 14:44, Andrey Sidorov [email protected] wrote:
my speed benchmarks (might be wrong, I'm biased) on air 5.1 2Ghz and local
mysql 5.6
sequential selects in one connection:
mysql-native ~ 5k selects/sec
node-mysql ~ 6-7k
node-mysql ~ 7-8k
mariasql ~10kselecting large number of rows or multiple selects in many parallel
connections:
mysql-native - ~ 200k rows/sec
node-mysql - 350k rows/sec
node-mysql2 - 2000k rows/sec
mariasql - 800k rows/secnumbers given for a very small row (1-2 numeric columns, might be
different for another types of data)Also there is server protocol api so you can easily mock any mysql
server behaviour.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-18062035
.
from nodejs-mysql-native.
In the meantime I'll try to port node-mysql pool code to mysql-native (e.i same pool api)
from nodejs-mysql-native.
Related Issues (20)
- better error handling for unsupported field types
- Handle socket errors HOT 6
- if connection closed during command execution nothing happens
- Data representation issue demonstrable using LEAST() or (x > 0). HOT 1
- how do I check the empty result HOT 2
- When will having the current pool feature?
- UTF-8 characters not stored HOT 1
- About Asynchronous HOT 4
- about execute HOT 4
- Boolean values in prepared statements break all following values HOT 1
- problems about charset HOT 6
- Documentation HOT 3
- Publish 0.4.5 to npm HOT 3
- Reading double values yields corrupted results. HOT 6
- Reading floats not supported.
- SQL injection? HOT 1
- Transactions Not Supported via execute(); Only via query() HOT 1
- global leak of 'h' HOT 1
- Version 10 of node.js has been released
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-mysql-native.