Open ConorWebb96 opened 1 month ago
The grid requests pages of 100 so it's probably something to do with all the joins required to get all the relationships - probably getting 100 total rows including those joined, so it hits the limit when it's only got a few (or in this case 1) row from the table in question. Absolutely waffling off the top of my head here but I reckon it's possible. @mike12345567 could certainly give a more accurate answer. But my bet is the limit is applied "too early" if you like, although it probably needs to be this way to avoid performance issues. Like if you had such a ridiculous relationship setup that you needed to fetch 1 million rows in order to get 100 fully enriched rows in the table in question, then it would just never work.
Commented further explanation on this one as part of the Linear issue - going into depth on the problem but basically its due to the level of cross-joining this table has, it can generate literally billions of responses which basically cannot be retrieved in Budibase.
Could this be fixed by restricting what tables return results per each defined relationship?
Eg in this example:
When you define the region -> industry relationship within Budibase. The relationship builder could have a toggle to not return results from other relationships linked to the region table. So whenever you want to use the industry data you will have access to the region table and its defined columns, but not the results from other relationships registered against the region table?
Could this be fixed by restricting what tables return results per each defined relationship?
Eg in this example:
When you define the region -> industry relationship within Budibase. The relationship builder could have a toggle to not return results from other relationships linked to the region table. So whenever you want to use the industry data you will have access to the region table and its defined columns, but not the results from other relationships registered against the region table?
Yes - this would be one possible solution to the problem - making it possible to select if a relationship is bi-directional or you only wish to reference one direction of it.
Checklist
Hosting
Describe the bug Whenever multiple relationships are attached to a table, not all rows will be displayed. Additionally, you can't scroll down as you normally would to be able to get more rows. Also rows for relationship plus rows in the table don't display anywhere near the 5000 row limit that is set by default.
To Reproduce Steps to reproduce the behavior:
Expected behavior All rows within the table should be visible. A decent amount of relationship related rows should also be visible.
Screenshots Builder row display for regions table
Database row display for regions table
Network request screenshot
App Export replicated-issue.tar.gz
Additional context The example table creates + insert queries should insert around 4410 rows, looking at the regions table only 153 rows are displayed out of these 4410 rows. It should be able to display them all.