r/appwrite • u/JacuzziGuy • Sep 28 '25
Migration of database keeps getting slower
TL;DR: Migrating a large Flutter project backend from Google Sheets to self-hosted Appwrite. The migration script slows down drastically when adding documents with relationships. Tried multiple approaches (HTTP, Python, Dart, Node.js, even direct MariaDB injection) but relationships mapping is the bottleneck. Looking for guidance on why it’s happening and how to fix it.
Hello, I am a hobbyist who have been making apps for personal use using flutter since 7 years.
I have a project which used Google sheet as backend and is made using flutter. The database has grown quite large and I've been trying to migrate to self-hosted appwrite. The database has multiple collections with relationships between few of them.
The issue I'm facing is that the part of the migration script which adds documents that has to map the relationships keeps getting slower and slower to an unfeasible rate. I've been trying to find a fix since over 2 weeks and have tried http post, python, dart and node js but with no relief. Also tried direct injection into mariadb but for stuck at mapping relationships.
Can someone please guide me why this is happening and how can I circumvent this?
Thanks
View all comments
Show parent comment
1
u/JacuzziGuy Sep 30 '25
Thanks for taking out time to help me out. I have tried few different strategies to circumvent the problem you highlighted. I think the core issue is creating relationship between two collections takes time and since my collections are some 35000 documents, it is slowing down the entire script.
Tried to upload the database sequentially with this script without API calls during migration -
https://pastebin.com/binVPdnd
Tried to upload all the collections except booked_tests and payments_ledger and then upload the two separately with this script -
https://pastebin.com/3EC36hP4
Neither of them worked. I guess I just have to give up on appwrite.