- 最后登录
- 2019-8-5
- 在线时间
- 74 小时
- 威望
- 51
- 金钱
- 703
- 注册时间
- 2012-3-1
- 阅读权限
- 50
- 帖子
- 94
- 精华
- 1
- 积分
- 51
- UID
- 271
|
1#
发表于 2012-4-17 10:51:04
|
查看: 3608 |
回复: 1
Oracle9i Enterprise Edition Release 9.2.0.8.0
sql :
select a.group_id,
a.plan_id,
a.service_id,
b.plan_id,
b.service_id,
a.acct_id,
b.serv_id
from zc.kpi_group_order a, zc.kpi_group_user_order b
where a.region_code = 771
and b.region_code = 771
and a.group_id = b.group_id
and b.serv_id =2038747932
and a.service_id = b.service_id
and a.service_id = 912
and b.plan_id = 80001201
and a.plan_id = b.plan_id;
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 56 | 1448 |
| 1 | NESTED LOOPS | | 1 | 56 | 1448 |
|* 2 | TABLE ACCESS BY INDEX ROWID| KPI_GROUP_ORDER | 193 | 5404 | 1062 |
| 3 | AND-EQUAL | | | | |
|* 4 | INDEX RANGE SCAN | IDX_GROUP_ORDER_PLAN_ID | 193 | | 413 |
|* 5 | INDEX RANGE SCAN | IDX_KPI_GROUP_ORDER_SERVICE_ID | 193 | | 413 |
|* 6 | INDEX RANGE SCAN | IDX_GROUP_ORDER_REGION_CODE | 193 | | 413 |
|* 7 | INDEX RANGE SCAN | IDX_KPI_GROUP_USER_ORDER_5 | 1 | 28 | 2 |
------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter("A"."REGION_CODE"=771 AND "A"."SERVICE_ID"=912 AND "A"."PLAN_ID"=80001201)
4 - access("A"."PLAN_ID"=80001201)
5 - access("A"."SERVICE_ID"=912)
6 - access("A"."REGION_CODE"=771)
7 - access("B"."REGION_CODE"=771 AND "A"."GROUP_ID"="B"."GROUP_ID" AND
"B"."SERV_ID"=2038747932 AND "B"."PLAN_ID"=80001201 AND "B"."SERVICE_ID"=912)
Note: cpu costing is off
执行计划走AND-EQUAL ??? |
|