设为首页 加入收藏

TOP

oracle性能优化操作十三:使用nls_date_format
2015-07-24 11:00:48 来源: 作者: 【 】 浏览:2
Tags:oracle 性能 优化 操作 十三 使用 nls_date_format

例:

select * from record where  to_char(ActionTime,'mm')='12';

这个查询的执行计划将是全表查询,如果我们改变nls_date_format,

alert session set nls_date_formate=’MM’;

现在重新修改上面的查询:

select * from record where  ActionTime='12';

这样就能使用actiontime上的索引了,它的执行计划将是(INDEX RANGE SCAN)。

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle实践--PL/SQL基础之触发器.. 下一篇ORA-00922:选项缺失或无效

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C++模板 (template) (2025-12-26 15:49:49)
·C 语言中模板的几种 (2025-12-26 15:49:47)
·模板(泛型) - C语 (2025-12-26 15:49:44)
·C语言中,“指针”用 (2025-12-26 15:20:18)
·在c语言的指针运算中 (2025-12-26 15:20:15)