案例十
-
--删除customers表上除主键索引外的所有索引
-
sh@TESTDB11>@drop_customers_indexes.sql
-
-
--创建位图索引
-
CREATE BITMAP INDEX bidx_cust_credit_limit ON customers(cust_credit_limit) NOLOGGING COMPUTE STATISTICS;
-
-
--query11.sql
-
--虽然cust_credit_limit不具有很好的可选择度,但对其位图索引的count操作十分有效.
-
SET ECHO ON
-
SET TIMING ON
-
SET AUTOTRACE TRACEONLY
-
SET PAGESIZE 1000
-
-
@flush.sql
-
select count(*) as credit_limit from customers where cust_credit_limit = 10000;
-
-
SET TIMING OFF
-
SET AUTOTRACE OFF
-
-
--执行query11.sql
-
sh@TESTDB11>@query11.sql
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1072721/
,如需转载,请注明出处,否则将追究法律责任。