i've got 2 different users with the same set of database, but when i run the same query on both users, they seem to be using different indexes to run the query. How do i make them use the same index?
Following is my query :
select a.cust,(b.dorq-b.qrtn) as qnty
from soinno a, ptdord b, socrsd c
where a.crid=b.crid and a.dono=b.dono
and b.crid=c.crid and b.refn=c.sono and b.oprt=c.part
and (a.crid>='AA' and a.crid<='ZZ')
and a.pmth >= '10410' and a.pmth <= '10412'
and a.cust not like 'ZZ%' and a.refn not like 'JS%'
one user is running on index with the following field
CRID
DONO
the other user is running on following index
CRID
CUST
Following is my query :
select a.cust,(b.dorq-b.qrtn) as qnty
from soinno a, ptdord b, socrsd c
where a.crid=b.crid and a.dono=b.dono
and b.crid=c.crid and b.refn=c.sono and b.oprt=c.part
and (a.crid>='AA' and a.crid<='ZZ')
and a.pmth >= '10410' and a.pmth <= '10412'
and a.cust not like 'ZZ%' and a.refn not like 'JS%'
one user is running on index with the following field
CRID
DONO
the other user is running on following index
CRID
CUST