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:
- Field 1 – Some primary data (e.g., work logs).
- Field 2 – A reference to Table A (e.g., user/employee).
- Field 3 – A reference to Table B (e.g., date).
Repeating Group Setup:
Outer Repeating Group (Table A - 5 entries)
- Displays entries from Table A (e.g., users/employees).
Inner Repeating Group (Table B - 7 entries)
- Displays entries from Table B (e.g., dates).
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:
- Why is it consuming such a high workload?
- Where exactly is the high workload coming from?
- 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!