When you have a SmartObject created from a Custom SQL SmartObject, you see that the result can take quite a while to come back. This could be around 25 - 30 seconds. This can also happen when applying ADO queries against the SmartObject.
You will see the following message:
"Timeout out period elasped prior to completion of Operation or the Server is not responding".
After investigating, it appears that it would be best to apply the setting “Use Native SQL Execution” which can be applied via the service instance in the SmartObject tester tool.
Please see: https://help.k2.com/onlinehelp/k2five/userguide/5.1/default.htm#servicebrokers/sqlserver/sql-server-service.htm
The setting may be set to false by default. This would need to be set as true. After this setting has been applied, you should be able execute complex queries that have been expressed in an ADO.net format, and further reduce time it takes for it be processed between the DB and K2.