I have K2 SMO and mapping with SQL Procedure.
If I try to run the SQL Procedure only. The excution time about 1 second.
But I run the SQL Procedure through the K2 SMO. It using time about 54 seconds.
How to solve this issue? K2 version is 4.7.
Good day Summit,
I did some research on my end, and believe the behavior you see is expected because when executing the SmartObject, 3 things take place:
This totals up to 18.1 seconds.
K2 is designed, when doing any SQL stored procedure, it performed the following steps:
- Execute stored proc and get data
- Bulk insert data into temp table
- And then to re-select it.
One of the reasons behind this design is the additional benefits when joining SmartObjects or filtering or paging at the Smartforms level.
A suggestion is to only query the data that you would need and apply a direct filter on the SmartObject call. Another suggestion is to use SQL view, in your scenario, SQL view will improve the performance.
You can also try supposedly restarting the K2 black pearl service or, restarting the K2 black pearl server.
Should you find this information useful please mark as "Kudo and/or Accepted Solution"
K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member