I'm looking into where we can add indexes. I have 2 or 3 queries similar to the one below. What would be an appropriate index for it, if any? Thanks.
select id from os_currentstep where (entry_id = " + wfId +
" and id in (select wf_step_id from workflow_activity_attribute where name = 'step_name'" +
" and value = '" + activityCode + "')" +
" and id in (select wf_step_id from workflow_activity_attribute where name = 'business_id'" +
" and value = '" + businessIdStr + "'))";
select id from os_currentstep where (entry_id = " + wfId +
" and id in (select wf_step_id from workflow_activity_attribute where name = 'step_name'" +
" and value = '" + activityCode + "')" +
" and id in (select wf_step_id from workflow_activity_attribute where name = 'business_id'" +
" and value = '" + businessIdStr + "'))";