Is there a way to clear off a table?
I use Baserow for logging and have literally millions of lines in these logs and it is wasting space and bloating my Postgres. How do I clear a table?
Like… it would be really awesome to set a filter like Date before and just remove everything on that table older than a month! Or even just clear the whole table… I don’t care. But it would be really annoying if I have to make a new table every month just because i wanted to delete a million lines.
Hi @roofboard, I’m Peter (another one! ), a full-stack dev at Baserow.
The problem you’re facing is definitely something we’re aware of, and in the future, we’d like to make the process a little easier to manage from within the UI. Two ideas we have are:
Unfortunately at the moment we have neither, but I can suggest three ideas you could try today:
You say you’re logging millions of rows in your table, could you perhaps programmatically rotate tables when you reach a specific size? E.g. once your table reaches ~250K rows, create a new one using the API, and then write another ~250K rows?
If you’re happy with emptying your table of rows, and you don’t mind losing the data, you could always issue a TRUNCATE on your table. Just be sure to backup your table if you do want to keep the data!