title: Knex vs. mysql2 based on performance, stability, and ES8+ support
body: <p>Does anybody have a hands-on experience with both DB-libraries — <a href="https://www.npmjs.com/package/knex" rel="nofollow noreferrer"><code>knex</code></a> vs. <a href="https://www.npmjs.com/package/mysql2" rel="nofollow noreferrer"><code>mysql2</code></a>?</p>
  
  <p>After some googling (e.g. at <a href="https://npmcompare.com/compare/knex,mysql,mysql2,node-mysql" rel="nofollow noreferrer">NPMCompare</a>), I'm still curious to know, based on real experience, what are the pros &amp; contra of both options?</p>
  
  <p>So far, the only real advantage of using <a href="https://www.npmjs.com/package/knex" rel="nofollow noreferrer"><code>knex</code></a> over <a href="https://www.npmjs.com/package/mysql2" rel="nofollow noreferrer"><code>mysql2</code></a>, that I clearly see, is its universal support of MSSQL, MySQL, PostgreSQL, SQLite3, and Oracle, while the latter supports MySQL only, but since currently I'm focusing on MySQL only, this <a href="https://www.npmjs.com/package/knex" rel="nofollow noreferrer"><code>knex</code></a>'s feature seems to be less relevant.</p>
  
  <p>The parameters I would consider:</p>
  
  <ul>
  <li>Performance &amp; load resistance;</li>
  <li>Stability (production ready);</li>
  <li>Native ES8+ support (callback-hell-free, no extra <a href="https://nodejs.org/api/util.html#util_util_promisify_original" rel="nofollow noreferrer"><code>Util.promisify</code></a> wrappers, <a href="https://nodejs.org/api/esm.html" rel="nofollow noreferrer">ESM/MJS</a> support);</li>
  <li>Short and clear, the less verbose the better.</li>
  </ul>