Skip to main content

We have a very large process (60 or so activities and 50 data fields) that has become quite slow to query using the process SmartObject generated by K2.  Simple queries can take upwards of 30 seconds to complete.

 

By studying the K2 ERD, we have been able to workout a view from the backing K2 database containing the fields we are interested in quering.  Initial testing shows a dramatic increase in search performance by querying this view vs. querying the process SO.

 

So my question is why shouldn't we use this approach?  For the sake of this thread, let's set aside arguments like "K2 could change their DB schema at ony time."

Hi,


 


Do the SmartObjects you are using in your processes contain a large number of records? As this performance tends to decline when the SmartObject is largely populated - if this is the case I would suggest the use of parameters when querying. 


 


Regards,


What's "large?" We already do queries with parameters, however, even with parameters that return a small result set, it still takes a long time to return the result set.

Sorry to hijack the post but i have a small question. you meantionded the K2 ERD. Is that something you've created from looking at the database or is that something available publicly. I would like a copy of that if possible.

 

Thanks


Hi Sbrownhuntoilco and S0mone


 


Sbrownhuntoilco I think depending on the amount of views, tabs, processes and forms you have the performance can most probably be affected for example if you have alot of tabs each containing alot of views, when the form is run and the initialize rule is executed then all of those tabs start to execute their view each executing their methods to retrieving and send data as defined in the initialize rules, all at the same time.


 


S0mone you can find the K2 ERD on this link or on the link of the Starting post of this conversation:


K 2 blackpearl K2 ServerLog Database ERD


 


 


Hi Sbrownhuntoilco and S0mone


 


Just quickly wanted to follow up as to if you have any question related to the issue disscused and also if the postings i sent was able to aid in the achievement of the solution or enclosing ot the solution.


We use the K2 API, not SmartForms.

 

The official answer from K2 support is what I expected: You can do it but its not supported.  They offered the following items to be aware of:

 

1. It's not officially supported, so K2 support may ask this be disabled/removed if you are troubleshooting an issue and K2 support feels its related.

 

2. Make sure you use the WITH (NOLOCK) table hint when querying.  This is should be a "duh..."

 

3. Don't INSERT, UPDATE or DELETE to the tables.  Also a "duh..."

 

4. K2 could change the DB schema in a future version.  Another "duh..."

 

We moved this into production last weekend and results have been very good so far.


Hi Sbrownhuntoilco


 


By saying "We moved this into production last weekend and results have been very good so far." does this mean that you have solved this issue with the details stated in you last post posted 07:51 AM  on  Apr. 2, 2014  ?


Hi Sbrownhuntoilco


 


I would like to add a solution to this conversation if the following is meant with your statement "We moved this into production last weekend and results have been very good so far." does this mean that you have solved this issue with the details stated in you last post posted 07:51 AM  on  Apr. 2, 2014  ?


Hi Sbrownhuntoilco,

 

I'm facing the same issue. I'm creating SSRS report using smartobject and this take a lot of time  to render.

I've tried to access the erd using the link you provided but the link doesn't work anymore.

Is it possible for you to send me a link of K2 database ERD.

 

Regards,

 

Kalab


Reply