虚拟索引virtua indexing
来源:互联网 发布:管家婆软件怎样做库存 编辑:程序博客网 时间:2024/05/29 02:20
虚拟索引定义的索引没有物理上实际创建,虚拟索引可以用在调优中。
1.通过xplan查询执行计划:
SQL> explain plan for
2 select * from sales where cust_id > 100;
Explained.
SQL> select * from table(dbms_xplan.display(null,null,'basic +cost'));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 781590677
------------------------------------------------
| Id | Operation | Name | Cost (%CPU)|
------------------------------------------------
| 0 | SELECT STATEMENT | | 3182 (2)|
| 1 | TABLE ACCESS FULL| SALES | 3182 (2)|
------------------------------------------------
8 rows selected.
2.创建虚拟索引。
SQL> alter session set "_use_nosegment_indexes"=true;
Session altered.
SQL> create index sales_id on sales(cust_id) nosegment;
Index created.
3.查看创建虚拟索引后的执行计划:
SQL> explain plan for
2 select * from sales where cust_id > 100;
Explained.
SQL> select * from table(dbms_xplan.display(null,null,'BASIC +COST'));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 2830526242
-------------------------------------------------------------
| Id | Operation | Name | Cost (%CPU)|
-------------------------------------------------------------
| 0 | SELECT STATEMENT | | 5 (0)|
| 1 | TABLE ACCESS BY INDEX ROWID| SALES | 5 (0)|
| 2 | INDEX RANGE SCAN | SALES_ID | 2 (0)|
-------------------------------------------------------------
9 rows selected.
- 虚拟索引virtua indexing
- Indexing Service 索引服务
- 数据库索引Database Indexing
- Lucene索引数据库 Indexing Database
- SQL Server Indexing(介紹SQL Server索引)
- 索引布尔表达式 [ Indexing Boolean Expressions ]
- 倒排索引-Indexing Boolean Expressions
- 隐含语义索引(Latent Semantic Indexing )
- 潜在语义索引(Latent Semantic Indexing)
- Phoenix二级索引(Secondary Indexing)的使用
- Phoenix二级索引(Secondary Indexing)的使用
- Phoenix二级索引(Secondary Indexing)的使用
- Ruby操作MongoDB(进阶六)-索引Indexing
- Indexing
- indexing
- 虚拟索引
- 虚拟索引
- 虚拟索引
- java在acm中大数运算教程
- Java RandomAccessFile的使用
- VRML---第五章(动画流程和交互功能)
- Nginx: error while loading shared libraries: libpcre.so.1
- 优秀的课外读物和推荐电影-来自于蔡朝阳的《以自由看待教育》
- 虚拟索引virtua indexing
- c++小点回忆
- Servlet3.1规范翻译——概览 (转)
- Java学习笔记 - java多线程
- Percona-Toolkit命令集合工具,Mysql不可或缺的必备利器之一
- 求实数绝对值 gcc
- php图像函数 imagecreatetruecolor()和imagecreate()的区别
- 自动化测试web控件定位方法
- IOS 自动填充视图控件长宽 笔记