现在的位置: 首页 > 综合 > 正文

B-Tree索引性能优于BitMap索引

2013年10月11日 ⁄ 综合 ⁄ 共 349字 ⁄ 字号 评论关闭

建立两张表:

CREATETABLE t_btree
ASSELECT *
FROM dba_objects

t_btree上建立bitmap索引

createbitmapINDEX object_id_bmx
ont_btree(object_id);

执行两次查询

SELECT * FROM t_btree WHERE object_id=9999;

发现了执行了71次cr,扫描路径是bitmap索引

Drop index object_id_bmx

创建btree索引:

CREATE 
INDEX object_id_btx
on t_btree(object_id);

执行两次查询

SELECT * FROM t_btree WHERE object_id=9999;

发现了执行了4次cr,扫描路径是index  range,证明是btree索引

 

抱歉!评论已关闭.