I am working on some IBM web application and it has one query hard coded in some part of the application which I cannot change or optimize - so modification of the SELECT statement is not possible. This is DB2 database.
Just to mention one important thing that query always returns 0 or 1 ROW!!!
Query is:
select *
from workorder
where parent= '682845'
and siteid= 'NY'
and woclass in ( 'WORKORDER' )
order by wosequence, taskid
Can someone please help me with definition of the proper index for this because this query is slowing the application too much and customer has big complaint.
I am not sure if I create index with three columns PARENT,SITEID,WOCLASS
it will help because of the order by on which I do not have influence_
Thanks