Hey good people
I’ve got a large database of approx 1million rows. I need to be able to create multiple tables on the front end for users to see. This requires using repeating groups and doing searches in each cell to populate it. The user should also be able to filter the dashboard by multiple fields. What’s the best way to query the database for this use case? When I do a “search for” in each RG cell it is incredibly slooooowww.
Hi @Atomily,
Nested searches on large datasets can get slow in Bubble, not to mention expensive.
A couple of best pratices would be to limit (nested) searches as much as possible, use pagination and use sattelite data types.
If you post a couple of screenshots of your data types and RG’s we can probably give you better and more specific advice.
Hope this helps,
Gerbert
MVP Design
Hey @gerbertdelangen
Thanks for stepping in to help. Perhaps to simplify it, all I really need to do is create a matrix. However when I use repeating groups the search formula is applied in each cell which is not scalable with a large amount of data. Because there are a lot of filters, a satellite data type would only slightly help because I would need to have each permutation if you know what I mean.
The ideal would be some sort of plugin or solution that calculates the cells instead of having to apply formulas in each cell. For example, I would provide the data type and select two fields for the rows and columns. I would select the calculation (e.g. count, sum etc.) and the table would populate each cell.
Here’s a silly example but the same principle applies


There is a plugin called ApexCharts by @Thimo that has a heatmap that can do this. The problem is that it is limited to fields that are type text (I would need other linked types) and you can’t reference the cell values.

Np, interesting situation.
Thanks for the detailed info. How often does the data change? If not that often you can also use a table with calculated totals which are updated by workflows triggered by trigger events.