Forum Academy Marketplace Showcase Pricing Features

Which is more efficient?

I have no experiences with database management so I’m not sure which way is more efficient. The “design” data type contains a lot more data records than the “user” data type. I prefer doing the “search for designs” option as I can sort from created date.

Also if anyone has any resources related to efficient database management then can you please link me some, many thanks!


Hi @phetxdphet
short lists are faster than searches, but long lists are slower (and have a limit of 10 000 records).

It really depends on the use case, but for the most part, I’d only set a list of things on an object if I knew that the number of these things will be relatively small (ex. Current User’s Cars or Current Users’s Pets).

I could write a a whole essay about it, but it’s probably better if you check out these two resources:
Bubble Best Practices by AirDev (Database and Speed tabs)

The Ultimate Guide to Bubble Performance ebook

Hope that helps,
Alan

1 Like

This 100%.

While I think sometimes the upper limit given is a little conservative you really don’t want 1000s of items in a list. At least not if you want to search it. There are usecases for longer lists.

1 Like

Hey @alanpieczonka!
Thanks for linking me the helpful resources, I also didn’t know Canva can be used with bubble! Also, just to clarify, which method is the list method and which method is the search method? (in terms of the first and second screenshot). My apologies if that sounds dumb :grimacing:

Hey @NigelG!
Thanks for the response! In my app, each user should average around 20-30 designs each but typically much less than that, in that case would you say that both methods are fine? Although the number of users could range to a couple thousand or even more depending on how much we scale.

This is how my database is structured:


@phetxdphet
The first screenshot is the list method (so you save a List of Designs on the User object/thing) and the second screenshot is the search method (and you don’t have to save List of Designs on the User object/thing because you can get these designs with a Created By = Current User search constraint just like on your screenshot).

I would also change the data type name from Designs to Design if it represents just a single design.

1 Like