High Workload Consumption in Nested Repeating Groups – Breakdown & Analysis

I have a nested repeating group setup in my Bubble app that is consuming 9.9K workload units, and I need help understanding why the workload is so high. Below is the structure of my data and how I am fetching records:

Database Structure:

  • Table A: Contains 5 entries (e.g., list of users or employees).
  • Table B: Contains 7 entries (e.g., list of dates).
  • Table C: Contains 60,000 entries, with three columns:
    1. Field 1 – Some primary data (e.g., work logs).
    2. Field 2 – A reference to Table A (e.g., user/employee).
    3. Field 3 – A reference to Table B (e.g., date).

Repeating Group Setup:

:one: Outer Repeating Group (Table A - 5 entries)

  • Displays entries from Table A (e.g., users/employees).

:two: Inner Repeating Group (Table B - 7 entries)

  • Displays entries from Table B (e.g., dates).

:three: Search Query (Table C - 60,000 entries)

  • For each combination of Outer Repeating Group’s current entry (Table A) and Inner Repeating Group’s current entry (Table B), I am performing a search in Table C:
    • Matching Field 2 with the current entry of Table A.
    • Matching Field 3 with the current entry of Table B.
    • Displaying Field 1 if a match is found.

Workload Issue:

Despite there being only one matching row per query in Table C, the total workload consumption is 9.9K units. I expected it to be lower, so I want to understand:

  1. Why is it consuming such a high workload?
  2. Where exactly is the high workload coming from?
  3. How can I optimize this to reduce workload usage?

Would appreciate any insights on how Bubble is processing these searches and how I can optimize this setup. Thanks! :raised_hands:

Did you set up the privacy rules correctly? This is very important, as queries will only be performed on data that the user has the “right” to see. This usually significantly reduces WUs consumption, in addition to ensuring the security of your app’s data.