Data fetching and WU consuption

A question that needs an immediate answer with this WU pricing…

How will relational databases work under WU count on data fetching?

Say I have a table of elements X in wich many items are related to hundreds of elements of a second table Y.

If I place a RG searching for elements in table X, will it load automatically all the related elements of table Y, even if I don’t call them in the frontend?

Will that be a huge problem for huge tables?

2 Likes

In my experience so far, it has only been a problem if you place the list of things from Y as a repeating group within a repeating group list from X. Then it loads all of Y as well as all of X, which is exponential rather than linear query, hence the large WU cost. May also be answered in the WU webinar today.

1 Like

That would mean the end of nested RGs…
It seems, from my forum studies, that even with pagination, all the data in a table is searched and charged in WU count form the moment the element is loaded in the page.

I hope we can get this answer in the webinar.

2 Likes

Well, the RG within RG was always a a sort of guilty pleasure. It used to cost you in terms of page load performance. Now it costs $.

And yet one of the examples in the webinar was encouraging us to use these lists instead of searching for related data types. They’re promoting workarounds to avoid being charged $ for their own ineffiencies which is pretty unbelievable.

3 Likes

So I believe the answer to the question is yes, you can not avoid loading data that you don’t need.

:confused:

1 Like

Pagination shrinks the amount of “things” Bubble will load from the server. So if you are using a fixed RG (amount of rows and columns is fixed) with X cells → Bubble will load only X “things” (plus related “things” for your nested RG). In the same time all fields of a “thing” are returned from DB even if you need only 1 field to display.
There is a couple of ways to reduce the amount of data:

  1. using satellite data types (you can have a satellite data type for using on search pages, for example. And within satellite data type you can have only fields you’ll need to display). But after new pricing model announcements I’m not sure if satellite data types maintenance (CRUD) will not become too expensive in WUs.
  2. using privacy rules (that’s not a solid solution, but it exists).

Josh mentioned that there are investigating in this area (here)