Fetching Data from Backend API

Hi team!
I have a Retool App where I need to fetch data from a Backend API which sends roughly 7000 rows of data to be populated in a table component. Each row contains certain elements like (html, sql query etc), all in all the total size of this data is around 40 MB (for 7000 rows I mentioned before).
Now, this query is not able to run in the retool app. It's taking around 30 seconds of loading time after which it fails to load the complete data or sometimes the retool app becomes unresponsive. In either case, I'm able to make this work, how do I do this? @alex
(I have also increased the limit for the query-run time from default 10 seconds to 100 seconds on advanced settings tab of the retool app)

Could you please share a screenshot of your query?