question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reason to switch from other library

See original GitHub issue

I know the teams are working together as per README but is there any good reason why i should switch from mysqljs/mysql to use this module instead?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mdierolfcommented, Dec 13, 2019

I use this module because I need to be able to retrieve results in array format using rowsAsArray, and to stream rows back into the DB using LOAD DATA + custom streams.

I work with large CSV datasets, and rowsAsArray gives a very large performance increase when retrieving results for my workload. Also, streaming rows to LOAD DATA saves a ton of memory when loading gigantic CSV files into the DB and keeps memory from spiking during data loads which lets us pack more containers into each physical host. I can read multi-GB files out of storage and into the DB using barely any memory on the host.

1reaction
sidorarescommented, Dec 9, 2019

I’m obviously biased, but for most users there are 2 important features that mysqljs/mysql lacks but this module provides: server side prepared statements and bundled promise wrapper ( you can easily have promise support using 3rd party modules with mysqljs/mysql as well)

There are other small differences here in there, for example adding custom auth plugin would be much easier here I guess. Performance might be better as well with mysql2 but please decide using your own benchmarks ( if mysql2 happen to be slower or take more memory please report, I’m happy to investigate )

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Reasons to Switch to eBooks and Change Your Life - Nozbe
3. Less demand for place ... This is one of the most important benefits. eBooks do not take up any space other than...
Read more >
The local library got a switch for everyone to play - Reddit
Because a library is perfectly happy if you just come in and "showroom" the book collection if that's what you want. Many people...
Read more >
Non-librarian health professionals becoming ... - NCBI - NIH
Some health professionals gave no reasons for leaving the health professions other than a love of and interest in the field of library...
Read more >
C# switch library using with program paremeters
The purpose of this class is simply to implement the common interface, and all behaviour is delegated to the real Library2.Foo .
Read more >
5 Good Reasons to Buy a Nintendo Switch in 2023 - MakeUseOf
1. The Switch Is Going to Be Supported for a Long Time · 2. The Switch Is the Best Console to Share With...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found