K2 Smart Object Execution Slowly

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.



0 Kudos
2 Replies

Re: K2 Smart Object Execution Slowly


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:

  1. Execute SQL Stored Procedure: 4.698 sec
  2. Bulk Insert (the SQL broker insert into a temp table to hold the data): 3.758 sec
  3. Results are capture by the SmartObject call 9.653 sec


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

0 Kudos

Re: K2 Smart Object Execution Slowly

Does this 'bulk insert data into temp table' apply to Oracle service instance mapped to Oracle stored procedure?
Why would SmO do this insert/reSelect only on a stored procedure and not a filtered/view?
0 Kudos