Coder Social home page Coder Social logo

Comments (6)

sidorares avatar sidorares commented on July 28, 2024

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.

chrisdew avatar chrisdew commented on July 28, 2024

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.

sidorares avatar sidorares commented on July 28, 2024

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.

sidorares avatar sidorares commented on July 28, 2024

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.

chrisdew avatar chrisdew commented on July 28, 2024

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 ~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.


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-18062035
.

from nodejs-mysql-native.

sidorares avatar sidorares commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.