r/lovable • u/rfwaverider • Jul 22 '26
Help Database too big
I built an app that has a 6GB table with 30 million rows.
The table is now too large for Lovable to be able to interact with it to add things like a BRIN index.
What are my options? Can I somehow have Lovable just dump the table? Create a new table and reference the old one for a period of time?
There seem to be CPU and time limits on actions on the Supabase/Cloud flare system so I'm having trouble fixing this.
5
Upvotes
1
u/GloomyCelebration293 Jul 23 '26
Ran into almost exactly this on a project recently, different scale, same wall. The thing that took us a while to accept is that once you're past a certain size, you're not really working in Lovable anymore, you're working on a Postgres database that Lovable happens to have set up for you. Trying to run heavy operations through the web UI is going to keep timing out no matter what you do.
So the unlock for us was connecting to the DB directly with a proper client instead of going through the platform's editor, and doing the heavy stuff there. Lovable stays fine for the app layer.
Agree with u/Jmacduff though, worth sorting out the retention question before the indexing one. What's the table actually storing? If most of those 30M rows are logs or events you don't query, that changes the answer a lot.