Caching queries across all users

I'm reading in data via a Google Sheets integration that then gets transformed, and I'd like to cache that across all users for the day for better performanbce. The sheet never updates during the day and loading from it takes a good 5-10 seconds.

Is there any way to do this under the current Retool model without adding a database server resource and then using a workflow e.g. to write it to a table that can be queried faster in SQL?

My guess is since Retool doesn't offer any server side storage of its own, this needs to be done via a third party resource?

I hadn't noticed that managed_db was a thing. Completely missed the reference to it and the other docs pages about caching and data persisting didn't bring that up either :slight_smile:

That said... I can't find a way to delete a table ad and the Workflow GUI 'Table' drop down menu didn't show my table for a while. It took at least 20/30 minutes for it to show up.

Hey @joostschuur!

You might want to check out Retool Database as an option for persisting your data as well! It seems as though things are working for the moment (albeit with an extra table :sweat: ) but Retool Database should have better functionality and performance. As of writing this, it's still in Beta, but well worth taking a look at.

1 Like

I did sign up to the waitlist, but don't have access to that yet. Could I get on the beta (firstname @playmob.com) please?

There's no way to connect to the managed_db via an external SQL client, is there? The connection password isn't shown under Resources and you can't copy a connection string. This means the only way to manage the data there (e.g. clear all the rows) is one row at a time using the Data Editor view, or probably by writing some JS task to do that.

Yep! You've been added to the beta @joostschuur :slightly_smiling_face:

At the moment you can't connect to the managed_db via an external SQL client which does restrict what you can do with it. If you're looking to just clear rows there is the option to allow delete queries to modify multiple rows:

1 Like

Amazing, thank you so much! Giving it a shot right now. At first I thought it would be nice to upload new docs (after the initial one it offers to figure out the schema) by just dragging them into the table too, but then I realised I can do that with a file upload component elsewhere in Retool :slight_smile:

I've started a new thread with some issues I ran into trying to avoid duplicates when inserting rows into a new Retool Database that I started with the beta.

any way to get beta access of managed retool db? thank you!

Done!

1 Like

thank you!