Applying migrations to MariaDB (running directly on macOS) unreasonably slow
See original GitHub issueBug 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
22smigrate dev
1m30s- single sql command to db, 6ms
Mac
migrate deploy
3m25smigrate 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:
- Created 2 years ago
- Comments:8
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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! 🙌
That’s quite the speed bump 😅 Glad that using docker is working for you.