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.

Applying migrations to MariaDB (running directly on macOS) unreasonably slow

See original GitHub issue

Bug description

We have user reports of unusually slow migrations with MariaDB on OSX. We did investigate and found the following timings for working with 100 migrations:

Linux

  • migrate deploy 22s
  • migrate dev 1m30s
  • single sql command to db, 6ms

Mac

  • migrate deploy 3m25s
  • migrate dev 10m34s
  • single sql command to db 28ms

Napkin math: deploy issues 3 mysql commands under the hood, so 3 x 28ms X 100 migrations ~ 10s but what we see is > 600s on mac

How to reproduce

Expected behavior

No response

Prisma information

Environment & setup

  • OS: OSX 12.01
  • Database: MariaDB 10.6.4
  • Node.js version: v17.0.1

Prisma Version

prisma                  : 3.4.0
@prisma/client          : 3.4.0
Current platform        : darwin
Query Engine (Node-API) : libquery-engine 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine        : migration-engine-cli 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash    : 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85
Studio                  : 0.438.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
amcjencommented, Dec 7, 2021

Moved over to a MariaDB Docker instance and indeed it is much much faster than before. We’ll move ahead with this approach–thank you for all your help, glad migrations are back to about 10 seconds instead of 15 minutes! 🙌

1reaction
floelhoeffelcommented, Dec 8, 2021

That’s quite the speed bump 😅 Glad that using docker is working for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MariaDB database migration - hangs infinitely while MySQL ...
I've migrated a website from a server running MySQL 5. to MariaDB 10.3, I was expecting if anything for the MariaDB to outperform...
Read more >
Slow migrations on local machine - Laracasts
Used software on local machine (macOS) and VPS (CentOS):. php@8.0.10; MariaDB 10.6.4; Laravel 8.58.0. On my local machine I'm using Homebrew and Valet ......
Read more >
[Apple Silicon, M1] Low database (MariaDB) performance ...
Overall this feels snappier, but applying Postgres migrations is still really slow to the point that my project doesn't even boot (it boots ......
Read more >
MariaDB running slow after migration from Mysql. - Reddit
We have migrated Our database from Mysql version 5.1.73 MyISAM to Mariadb 10.3.26 Innodb engine. Ever since we are observing slowness in ...
Read more >
migration assistant very slow - Apple Community
I wanted to migrate (by Apple the migration assistant app) all my data (settings, apps, users) with about 420GB from my old MacBook...
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