Hi everyone,
I’m looking for a way to archive rows from one table to another in Glide.
Here’s my situation:
- I’m using Glide Tables (not Google Sheets)
- I have a main table (let’s call it “Opportunities”) with rows I no longer actively use
- Instead of deleting them, I want to move them to an “Archive” table to keep the history
- The problem is that all my relations between tables are based on Row IDs
- Since Row IDs are unique to each table, I can’t simply duplicate the table structure and move rows over, the relations would break
Has anyone found a clean way to:
- Archive rows from a Glide Table to another table while preserving relational integrity?
- Or work around the Row ID dependency for relations?
Any advice or workaround would be hugely appreciated. Thanks!
I’d avoid moving rows at all.
An archived Opportunity is still an Opportunity. You’re not creating some new kind of object/entity by archiving it. Moving rows to a separate table just hides the “archived” status behind a table name rather than storing it as an actual data point, which is going to cause you headaches down the road.
I would add an Is Archived boolean column to your Opportunities table and filter your views and queries based on that. Relations stay intact. It’s simple to set up.
2 Likes
Thank you for your reply.
The reason we are looking to move rows to another table is purely for performance reasons. Our table currently contains over 25,000 rows, which is causing noticeable slowdowns in the app.
The goal of archiving is not to change the data model, but simply to reduce the number of active rows in the table to lighten the load and improve performance.
Do you have any recommendations for managing performance at this scale in Glide Tables?
Understood. If you do go down the road you’re exploring, are you putting off you issue to later?
I wonder if you wouldn’t be better off replacing your table which has reach 25k rows with a Big Table?
Do you need all 25k rows of that table in the app? What if you exported the table as a CSV every quarter or year or at regular intervals and then delete the rows you don’t need? Removing child items would be another question to ask yourself.