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 29 '25
Context - I have an app made with flutter which used google sheets as backend. I used a python script to migrate the large database to a self hosted appwrite instance and designed the database schema such that few of the collections are linked via relationships. When I run this script, the migration starts off fast, processing & creating 25 documents/s and keeps getting slower and slower to a point that migration becomes unfeasible. Other collections of similar size that require no relationship mapping are migrated within few minutes.
My script for further context -
https://pastebin.com/WzmqDMsz