添加索引后,没啥效要,这方面优化没啥效果,如果项目要用到DISTINCT进行去重,需要再去确认基表关联,确认业务。
SQL> select t.object_id from t_distinct_tb t ;
已选择50631行。
已用时间: 00: 00: 00.71
执行计划
----------------------------------------------------------
Plan hash value: 1512865825
-----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 50086 | 635K| 161 (2)| 00:00:02 |
| 1 | TABLE ACCESS FULL| T_DISTINCT_TB | 50086 | 635K| 161 (2)| 00:00:02 |
-----------------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement
统计信息
----------------------------------------------------------
50 recursive calls
0 db block gets
4109
DISTINCT 列添加索引
最新推荐文章于 2024-09-28 00:52:22 发布