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!
Hi @picklepete
Been now almost 2 years since your post and still NO ability to multi delete rows!
Just started on baserow, but I see this as a show stopper!
What are your plans on this? Txs…
@picklepete
LOL - we are talking about a BASIC “drop” function of ANY DB!
I tried to delete with the “Delete rows” function as you are suggesting - but VERY keen to get your explanations on how I can “shift select” 25k rows!
ANY DB whether SQL / Airtable or nocoDB has such a function - you thoughts it was needed and a good idea… 2 years ago!
Why is it still not implemented? And will it ever be?
Thank you for the feedback, it’s much appreciated!
You are absolutely correct, it’s trivial in all RDMS to truncate a table. We have other considerations to take into account, however, when such a feature is prioritised at Baserow.
As this feature hasn’t been requested particularly often, it’s not very high on our priority list, but feel free to keep an eye on our roadmap for upcoming features and bug fixes!