how to make the query use index scanning
I have a table assy_dcop have index ASSY_DCOP_IDX3 on column lotid. please refer below xplan.
16:42:55 SYSTEM@ dwdb>explain plan for
16:52:29 2 select * from dw2admin.assy_dcop where lotid='xxxx';
Explained.
16:52:48 SYSTEM@ dwdb>@xplan
PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
-----------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 253 | 4 (0)|
| 1 | TABLE ACCESS BY INDEX ROWID| ASSY_DCOP | 1 | 253 | 4 (0)|
| 2 | INDEX RANGE SCAN | ASSY_DCOP_IDX3 | 1 | | 3 (0)|
-----------------------------------------------------------------------------------
but when I use below statement, the query not use the index scan, it is not use index scan even use hints
16:30:09 SYSTEM@ dwdb>explain plan for
16:42:49 2 select distinct d.lotid,
16:42:49 3 d.custlotid,