Hi Gurus,
we have defined Composite primary key in Uploading_Data table for the 4 columns(Col1,col2,col3,col4)
but when we are deleting the data from the table based on the 3 columns(Col1,col2,col3) in the condition (based on the Business logic) and the optimizer is not using index on the defined table..
In order to use the Index, i have to use the 4 columns but i cant.
DELETE FROM Uploading_Data
WHERE col1 = 'Part1'
and col12 = 'Part2'
and col3 = 'Part3' ;
i see the Oracle Doc usage of Optimizer Hints for DELETE
but this works on this table for the 3 columns(Col1,col2,col3) in condition ...?
Oracle Database supports more than 60 hints, each of which may have zero or more parameters. A statement block can have only one comment containing hints, and that comment must follow the SELECT
, UPDATE
, INSERT
, MERGE
, or DELETE
keyword. For example, the following hint directs the optimizer to pick the query plan that produces the first 10 rows from the employees
table at the lowest cost:
DELETE /*+ INDEX (a RADACCT_STRTIME_IND) */ FROM Uploading_Data a
WHERE a.col1 = 'Part1'
and a.col12 = 'Part2'
and a.col3 = 'Part3' ;
Can i force the optimizer to use the index on the Uploading_Data in DELETE function for the 3 columns(Col1,col2,col3) in condition or Is there any thing to do that
thanks in advance
Seenu