Forum Academy Marketplace Showcase Pricing Features

How to delete all items in a table ... quickly

I have 15K items in a table that I need to purge. I have a bulk operation running but its going to take hours.

Is there a faster way to purge all the content of a db?

Also - the bulk operation is modal and is keeping me from doing anything else. What happens if I stop it by refreshing? Bad idea?

you could get a little messy and put the records into a RG,

using the orchestra plugin, you could run a delete operation for each cel in the RG

you’d want to ‘display entire list’ and not actually put anything other than the musician element into the cell.

there’s plenty of forum posts about how to set this up but ^^^^ method is how I do work on lists.

i was able to modify a list of 204 items and it took maybe 10 seconds.

its so much faster than modifying things with bulk action or manually from the DB

idk if you’ve ever deleted 100 things from the DB at once but it’s god awful slow. a hell of a lot slower than doing it this way from my experience.

1 Like

or

do every .1 seconds (WHEN search for things to delete:count >1)
delete a thing (do a search for things to delete: first item’s:unique id)

this would get you down to about 1500 minutes :rofl: :sob:
^^^ roughly a full day

I know I’ve read in the past that the fastest way to import a large amount of data would be through an API Post…might also be true for deleting data.

The bulk delete job started at around 9:30 today and its about 2/3rds of the way through. This is not a good bottleneck. Thanks for the ideas.

@boston85719 i’ve also deleted things via API and there is no bulk edit so it was one by one and it was also slow.

Delete the table and recreate it? (or copy the records you want to keep to a new table and rename the table?) Just ideas - doing many Db operations is very slow in Bubble however I’ve never noticed it impact performance while the operation is going on.

1 Like

interesting. I thought about doing the delete/recreate thing … but i wasnt sure that bubble wouldnt reject the new table as a different one and make me change all the workflows related it to it.

@PineappleJoe :wave:

Just another idea. :man_shrugging:t2: You can restore your database from live if it’s empty. Or from dev to live if one of the databases are empty.

I normally just run my own backend workflows that repeat themselves and let it run without me waiting for anything.

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs: