I have a read only grid that is supposed to populate with all entries in a record with a certain flag and put that into a read only grid. The problem I run into is that despite the grid displaying only 3 entries at a time, the query keeps timing out because of how large the number of entries is. I need all entries to be available for my functionality and it is set to load as async. Is there a way to bypass the query timeout error?
Discussion posts and replies are publicly visible
jeremyp608295 said:I need all entries to be available for my functionality
May I know how you are querying data and why you need all entries? Could you share your gridField data parameter definition?
jeremyp608295 said:Is there a way to bypass the query timeout error?
There is no direct way of doing this, but based on the query, we can optimize it. Share more details.
Only way is to optimise the data query and batch the dataset. How is the 'data' parameter of the gridField() configured? Is it referencing a record directly or some rules?
Please share some code snippets and/or screenshots with us - helpful in understanding your attempted setup.
I understand that there are sometimes some overriding requirements, but what I've found in cases like this is *usually* that a particular view (at least, it sounds like you're querying a view) is overloaded with the "trying to do everything at once" effect.
Why exactly? What functionality does this fulfill, and how sure are you that querying "all entries" is the only way to do it?
Are you pulling the data from related records and using pagination as well?If you can share query and parameter of your gridField , we can suggest better. Else, try optimize the code first. But make sure you are not pulling unwanted data too.
What kind of "query" is that?