- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
3#
发表于 2013-8-13 16:50:37
从sql tuning 过程中获得的10046 trace内容的 有用SQL如下:
/* Formatted on 2013/8/13 16:46:00 (QP5 v5.163.1008.3004) */
SELECT /* DS_SVC */
/*+ cursor_sharing_exact dynamic_sampling(0) no_sql_tune no_monitoring optimizer_features_enable(default) result_cache */
SUM (
C1)
FROM (SELECT /*+ qb_name("innerQuery") NO_INDEX_FFS( "T2") */
1 AS C1
FROM "T2" SAMPLE BLOCK (42.0168, 8) SEED (1) "T2") innerQuery
SELECT /* DS_SVC */
/*+ cursor_sharing_exact dynamic_sampling(0) no_sql_tune no_monitoring optimizer_features_enable(default) result_cache */
SUM (
C1)
FROM (SELECT /*+ qb_name("innerQuery") NO_INDEX_FFS( "T1") */
1 AS C1
FROM "T1" "T1"
WHERE ("T1"."OBJECT_NAME" LIKE '%T1%')
AND ("T1"."OBJECT_NAME" IS NOT NULL)) innerQuery
SELECT /* DS_SVC */
/*+ cursor_sharing_exact dynamic_sampling(0) no_sql_tune no_monitoring optimizer_features_enable(default) result_cache OPT_ESTIMATE(@"innerQuery", TABLE, "T1#1", SCALE_ROWS=0.0168) */
SUM (
C1)
FROM (SELECT /*+ qb_name("innerQuery") NO_INDEX_FFS( "T2#0") */
1 AS C1
FROM "T2" SAMPLE BLOCK (42.0168, 8) SEED (1) "T2#0", "T1" "T1#1"
WHERE ("T1#1"."OBJECT_NAME" LIKE '%T1%')
AND ("T1#1"."OBJECT_NAME" IS NOT NULL)
AND ("T1#1"."OBJECT_ID" = "T2#0"."OBJECT_ID")) innerQuery
/* SQL Analyze(243,0) */ select /*MACLEAN2*/ t1.*,t2.owner from t1,t2 where t1.object_name like '%T1%' and t1.object_id=t2.object_id
/* SQL Analyze(243,0) */ select /*MACLEAN2*/ t1.*,t2.owner from t1,t2 where t1.object_name like '%T1%' and t1.object_id=t2.object_id
/* SQL Analyze(243,0) */ select /*MACLEAN2*/ t1.*,t2.owner from t1,t2 where t1.object_name like '%T1%' and t1.object_id=t2.object_id |
|