在pl/sql 里实现index 索引 效果
2011-01-28 21:50
309 查看
-------INDEX---------
create table tb_tttt(
tid number,
tname nvarchar2(30),
tnum number
);
create sequence seq_tt
start with 1
increment by 1
maxvalue 999999
minvalue 1
cache 10;
begin
for n in 2..99999 loop
insert into tb_tttt values(seq_tt.nextval,'aaa',123);
end loop;
end;
create index tt_index on tb_tttt(tid) tablespace users;
drop index tt_index;
declare
nname nvarchar2(30);
begin
for n in 1..99429 loop
select tname into nname from tb_tttt where tid=99429;
end loop;
end;
分别两次查询,一是带索引的,一是没有索引的
create table tb_tttt(
tid number,
tname nvarchar2(30),
tnum number
);
create sequence seq_tt
start with 1
increment by 1
maxvalue 999999
minvalue 1
cache 10;
begin
for n in 2..99999 loop
insert into tb_tttt values(seq_tt.nextval,'aaa',123);
end loop;
end;
create index tt_index on tb_tttt(tid) tablespace users;
drop index tt_index;
declare
nname nvarchar2(30);
begin
for n in 1..99429 loop
select tname into nname from tb_tttt where tid=99429;
end loop;
end;
分别两次查询,一是带索引的,一是没有索引的
相关文章推荐
- 在PL/SQL中如何实现.NET的String.Format功能
- ViewFlipper实现带索引效果的自动播放也可手动滑动的广告栏
- PLSQL(PL/SQL)集成Team Foundation Server (TFS),实现数据库代码的版本管理
- Oracle Index 索引介绍(SQL)
- PL/SQL学习笔记-索引
- Oracle中实现MySQL show index from table命令SQL脚本分享
- SQL Server下实现利用SQL Server Agent Job对索引重建实现Balance Load
- Oracle SQL中实现indexOf和lastIndexOf功能
- PL/SQL实现JAVA中的split()方法的小例子
- oracle中pl/sql记录与index-by表
- sql 索引(index)
- 【Oracle】PL/SQL实现打印1-100中的素数
- pl/sql存储过程中游标嵌套的实现方法
- 使用PL/SQL Developer图形界面轻松实现oracle定期计划任务
- SQL 实现 Mysql Group_Concat()效果
- 《高性能SQL调优精要与案例解析》一书谈主流关系库SQL调优(SQL TUNING或SQL优化)核心机制之——索引(index)
- PL/SQL Developer实现双击table表名查询
- PL/SQL学习笔记-索引
- 在pl/sql中使用exp/imp工具实现oracle数据导出/导入
- Oracle index】SQL语句利用函数索引注意点