K2 Smart Object Execution time

  • 8 November 2021
  • 2 replies
  • 9 views

Badge

K2 smartobject takes too long to return data 30 seconds or so

Noticed This issue only on smart objects containing fields of type File.

However Running SQL query returns the data in just 2 seconds.

I have less than 5 records in the Database, why is the smartobject taking too long to execute?

we are using K2 Five


2 replies

Hi,

Where is the Database hosted? are these Azure environments? is the database for the smo in the same region as the k2 environment?
Firewalls, region, Access, total records inside the table all of these things play a role in the execution time of smo.

Small things to consider - adding indexes into table, Moving application database to same region as K2 server.

With the context from your question I hope it moves you in the right direction.
https://www.sqlshack.com/using-the-sql-execution-plan-for-query-performance-tuning/

Kind Regards
Sarel


Userlevel 3
Badge +9

 


If you have the ability to, consider creating a SmartObject list method that does not return the file by default, then make a second request to retrieve the file when a user actually clicks on it based on the id of the row that was chosen


 


If you are returning the files as part of a list method then you're shipping the entire file contents back for each row.


 


Cheers

Reply