While fetching data through extension method got connection timed out error/

I create an OutSystems extension and execute the database query while fetching it gives me "The connection has timed out." within 10-12 seconds. Please suggest configurations.  In service studio environment connection setting for short and long operations are 60 and 600 secs 


Please test the query in the SQL to measure its performance.

Use Test Connection in Service Center to check it is valid.

Only after both connection and query are ok, you can adjust the rest.