First time of a search takes 15 seconds, subsequent runs of this exact same search takes 1 second. How to improve this?

It’s a simple search with 4 simple constraints. I don’t think it’s a database structure issue since subsequent runs are fast.
Also I don’t think it’s a constraint issue, because I removed all the constraints and the speed is unaffected (still slow).

It just searches for a data type, Product, and I currently have a 100 of it in my database.
What’s going on?

I tried preloading the data in a repeating group by doing that search and it didn’t helped, then doing that search:first item in a group and also didn’t helped. The first run still takes 15 seconds and the next ones still takes only 1 second.

Any clues on why is this going on or how to improve this?

1 Like

The Bubble team has made a handful of comments about caching searches, which would explain why it’s faster the second time around.

Are you on a free plan or a paid plan?

This app is on a paid plan, personal. Funny thing is that this exact same search, but in another workflow (same page), takes less than 1 second. I have no clue what’s going on :roll_eyes:

Searched a bit on the forum for caching search knowledge but couldn’t find anything useful. Running that search on background beforehand won’t help, that workflow is still slow on that search.

And I’m sure it’s it because when I delete it the workflow finishes fast.

I’ll tinker around… maybe there’s another way.

But if someone get any idea please share with me! Any suggestion is welcome.

1 Like