Is it possible to override some sql queries?

cancel
Showing results for 
Search instead for 
Did you mean: 
rnovikov
Member II

Is it possible to override some sql queries?

I found out that some queries are not optimal, for example:

select count(distinct RES.ID_) from ACT_RU_TASK RES inner join ACT_RU_VARIABLE A0 on RES.PROC_INST_ID_ = A0.PROC_INST_ID_ WHERE ( exists(select LINK.USER_ID_ from ACT_RU_IDENTITYLINK LINK where USER_ID_ = ? and LINK.TASK_ID_ = RES.ID_) or RES.ASSIGNEE_ = ? or RES.OWNER_ = ? ) and A0.TASK_ID_ is null and A0.NAME_= ? and A0.TYPE_ = ? and A0.TEXT_ = ?

I want to override this query

1 Reply
salaboy
Senior Member

Re: Is it possible to override some sql queries?

You probably can, but you will need to make sure that your query is correct for all the use cases that the previous one was defined. 

I would rather recommend to submit a PR with a test case that demonstrate that the new query is better, so we can all benefit from it.