For 1st one.. here is the explain plan
Plan
SELECT STATEMENT ALL_ROWS Cost: 66,710 Bytes: 27,984 Cardinality: 528
1 TABLE ACCESS FULL TABLE ORD.ORD_COMPONENT Cost: 66,710 Bytes: 27,984 Cardinality: 528
for 2nd
SELECT STATEMENT ALL_ROWS Cost: 7,552 Bytes: 6,138 Cardinality: 99
2 COUNT STOPKEY
1 TABLE ACCESS FULL TABLE ORD.ORD_COMPONENT Cost: 7,552 Bytes: 6,200 Cardinality: 100
Main Topics
Browse All Topics





by: tangocoderPosted on 2009-11-03 at 15:07:44ID: 25734904
The question about this issue is what level ofcardinality does type and status have. In other words what do you expect the full number of rows to be collected? From a quick look at your data it seems that you have 1000 rows being returned. How long does this query take? If 10% of the rows are being returned the use of a composite index on type and status might have a limited affect on the cost of the query. These are the issues you should resolve. Additionally are there alot of updates and deletes? This will also impact the use of an index on the two columns.