Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

SQL Query via MID SERVER

johngomes
Tera Contributor

Hi everyone,

 

I have an SQL query that is taking a long time to return the result of the query via DataSource. The volume of data that the query retrieves is large, around 900 thousand rows.
However, when testing the query on SQL Server, it runs with an average time of 15 seconds, but when testing via DataSource, it exceeds the Mid Server timeout of 300s, so the operation is aborted.
Splitting this query would make me have to run several DataSources instead of just 1... does anyone have any suggestions on how to solve this?

1 REPLY 1

VikMach
Mega Sage

Hi @johngomes, have you tried "limit" and "offset" methods in your SQL query to fetch the data incrementally rather than fetching all at once due to time out.
If not, see example here - https://www.w3schools.com/mysql/mysql_limit.asp.

Let me know if this works.

Regards,
Vikas K