Having a bit of a developer background (though by no means an expert), I initially took for granted that I knew how to build performant Bubble apps. But I’ve now been questioning whether I’m doing some pretty basic things in the best way.
I searched this forum and on Google and did not come up with anything that addressed this directly, even though it seems basic so I may have been using poor keywords.
Suppose you have two data types - User and Things. A User can create a Thing.
Now imagine you want to display a list of Things created by the Current User.
Is the best way to do this to perform “Search for Things Created By = Current User”? Is this the most scalable method with potentially 10,000s of users and 100,000s or 1,000,000 of things?
My assumption going into Bubble is that concepts like DB indexes are automatically built for commonly searched fields like Created By, and I’m sure that’s true. In my old life, standing up a MySQL database with an index on the “Created by” field would give pretty impressive performance for a very long time, definitely into the millions of records. I know Bubble uses ES in various ways which should be far superior, even.
Let’s also say you want to display the total number of things created by the user within the last month. Should you do a text element that displays a “Search for Things created by Current User, where Created At is > -30 days:count” ? Or is there a better method?
What prompted me to start thinking about all this is that I have been doing things exactly as described above, and in the latter case (the # of things created by a user in the last 30 days), I’ve already seen a big performance slow down with only a couple hundred Things and 3 Users. The text element with the aforementioned count is the last thing to pop in on my page.
I’ve seen folks reference having a List of Things on their User object, but saw conflicting info on this as well and didn’t see much tactical implementation suggestions for how to best accomplish this. I’d like to avoid reconciling a list of Things on the user if it’s not going to be the most performant option in the long term.
Thanks in advance!