profile

简介: SQL> declare 2 v_hints sys.sqlprof_attr; 3 begin 4 v_hints:=sys.sqlprof_attr('full(test)'); 5 dbms_sqltune.

SQL> declare
2 v_hints sys.sqlprof_attr;
3 begin
4 v_hints:=sys.sqlprof_attr('full(test)');
5 dbms_sqltune.import_sql_profile('select * from ovsee.test where id =1',
6 v_hints,'SQLPROFILE_NAME1',force_match=>true);
7 end;
8 /

PL/SQL procedure successfully completed.

SQL> set autotrace trace explain;
SQL> select * from ovsee.test where id =1;

Execution Plan

Plan hash value: 3230054581



| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
Time |



| 0 | SELECT STATEMENT | | 1 | 35 | 1 (0)|
00:00:01 |

| 1 | TABLE ACCESS BY INDEX ROWID| TEST | 1 | 35 | 1 (0)|
00:00:01 |

|* 2 | INDEX RANGE SCAN | IDX_TEST_ID | 1 | | 1 (0)|
00:00:01 |



Predicate Information (identified by operation id):

2 - access("ID"=1)

Note

  • dynamic sampling used for this statement (level=2)
  • SQL profile "SQLPROFILE_NAME1" used for this statement

SQL> select /+full(test)/ * from ovsee.test where id =1;

no rows selected

SQL> select * from table(dbms_xplan.display_cursor(null,null,'outline'));

PLAN_TABLE_OUTPUT

SQL_ID gh3h5nq2zcw7d, child number 0

select /+full(test)/ * from ovsee.test where id =1

Plan hash value: 217508114


| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

| 0 | SELECT STATEMENT | | | | 2 (100)| |

|* 1 | TABLE ACCESS FULL| TEST | 1 | 35 | 2 (0)| 00:00:01 |

Outline Data

/*+

  BEGIN_OUTLINE_DATA
  IGNORE_OPTIM_EMBEDDED_HINTS
  OPTIMIZER_FEATURES_ENABLE('11.2.0.4')
  DB_VERSION('11.2.0.4')
  OPT_PARAM('_b_tree_bitmap_plans' 'false')
  ALL_ROWS
  OUTLINE_LEAF(@"SEL$1")
  FULL(@"SEL$1" "TEST"@"SEL$1")
  END_OUTLINE_DATA

*/

Predicate Information (identified by operation id):

1 - filter("ID"=1)

Note

  • dynamic sampling used for this statement (level=2)

37 rows selected.

SQL>
SQL>
SQL>
SQL>
SQL>
SQL>
SQL> declare
2 v_hints sys.sqlprof_attr;
3 begin
4 v_hints:=sys.sqlprof_attr('FULL(@"SEL$1" "TEST"@"SEL$1")');
5 dbms_sqltune.import_sql_profile('select * from ovsee.test where id =1',
6 v_hints,'SQLPROFILE_NAME1',force_match=>true,replace=>true);
7 end;
8 /

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL> select * from ovsee.test where id =1;

no rows selected

SQL> select * from table(dbms_xplan.display_cursor(null,null,'outline'));

PLAN_TABLE_OUTPUT

SQL_ID gnrk70cay86mf, child number 0

select * from ovsee.test where id =1

Plan hash value: 217508114


| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

| 0 | SELECT STATEMENT | | | | 2 (100)| |

|* 1 | TABLE ACCESS FULL| TEST | 1 | 35 | 2 (0)| 00:00:01 |

Outline Data

/*+

  BEGIN_OUTLINE_DATA
  IGNORE_OPTIM_EMBEDDED_HINTS
  OPTIMIZER_FEATURES_ENABLE('11.2.0.4')
  DB_VERSION('11.2.0.4')
  OPT_PARAM('_b_tree_bitmap_plans' 'false')
  ALL_ROWS
  OUTLINE_LEAF(@"SEL$1")
  FULL(@"SEL$1" "TEST"@"SEL$1")
  END_OUTLINE_DATA

*/

Predicate Information (identified by operation id):

1 - filter("ID"=1)

Note

  • dynamic sampling used for this statement (level=2)
  • SQL profile SQLPROFILE_NAME1 used for this statement

38 rows selected.

SQL>

目录
相关文章
|
机器学习/深度学习 网络架构 计算机视觉
UNet详细解读(一)论文技术要点归纳
UNet详细解读(一)论文技术要点归纳
886 0
|
安全 网络安全 数据安全/隐私保护
阿里云服务器不能发邮件禁用25端口的三种解决方法
阿里云服务器不能发邮件禁用25端口的三种解决方法
3198 0
|
机器学习/深度学习 人工智能 编解码
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第一章~第三章(一)
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第一章~第三章
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第一章~第三章(一)
|
7天前
|
云安全 人工智能 运维
当攻击全面Agent化,你的安全防御能否跟上AI Speed?
多起客户侧AK泄露事件应急的真实观察
1313 6
|
6天前
|
人工智能 API 开发工具
DeepSeek Harness 神插件:白嫖 13 家大厂模型
`dsh-our-free-model` 是 DeepSeek Harness 神级插件:零配置、零API Key、零账号,聚合13家大厂免费模型(含DeepSeek V4.1 Flash、Kimi K3等),支持本地网关、用量看板与自动降级,真正实现“白嫖即用”。
|
10天前
|
存储 人工智能 安全
千问办公官网入口网页版登录:qwenwork.cn 注册送2000积分、登录送100积分
阿里云千问办公(QwenWork)是AI智能工作平台,支持一句话生成PPT、表格、网页、视频及数据分析。个人免费版送2000积分+每日登录赠100分,含1GB存储、5个发布页;企业版198元/席/月起。阿里千问办公QwenWork官网:https://t.aliyun.com/U/0VCTGt 阿里AI工作平台,一句话完成数据分析、PPT 生成、视频剪辑、网页搭建等复杂任务
|
1月前
|
人工智能 JSON API
全网刷屏的 Jev 模型正式开放!一手实战测评 + 保姆级教程
全网爆火的 Jev 模型是什么?有什么用?怎么使用?怎么接入 AI 编程工具?效果真的好么?傻子可懂的 Jev 保姆级实战教程 + 项目实战测评来啦
9981 33
|
5天前
|
人工智能 开发者
Qoder CN 大使计划正式开启|无限创造,等你一起
全年免费积分、优先内测、活动支持与更多共创机会,邀请用 Qoder 把想法变成现实的你。
530 6
|
16天前
|
存储 人工智能 并行计算
大模型本地部署终端选型方法论:以 Qwen3.8-27B 为例的四档分层完整流程
本文提出一套大模型本地部署终端选型方法论:定约束、定档位、定框架、定参数四步决策法,配合入门、主力、质量、无损四档分层模型。以 Qwen3.8-27B 实测数据为例,逐环节解读显存、带宽、存储、散热、系统、预算等要素,给出面向不同预算的优选方案、决策自查清单与市场观察框架。文末前瞻 AI 笔记本的 CPU+GPU 与统一内存两条路线,论证四步决策法在新品类上的延续性。