由买买提看人间百态

topics

全部话题 - 话题: choosecost
(共0页)
B*****g
发帖数: 34098
1
来自主题: Database版 - Which one is better?
why CHOOSECost for (1) is more than (2)?
SELECT *
FROM c
WHERE EXISTS (SELECT 1
FROM a
WHERE a.key = c.key
AND ROWNUM = 1)

Plan
SELECT STATEMENT CHOOSECost: 670,429 Bytes: 87,120,580 Cardinality: 215,
645
4 FILTER
1 TABLE ACCESS FULL C Cost: 23,494 Bytes: 87,120,580 Cardinality:
215,645
3 COUNT STOPKEY
2 INDEX RANGE SCAN UNIQUE INDEX1(***table A***) Cost: 3 B
(共0页)