表的索引

create table weisi_t as select * from dba_objects;

set autotrace on

set timing on

set linesize 200

select * from weisi_t where object_id=10;

create index index_weisi on weisi_t(object_id);

select * from weisi_t where object_id=10;

update weisi_t set object_id=10 where 1=1;

1:索引的分類

? ? 1)btree(balance tree)索引

? ? ? 索引三大特點:高度低、存儲列值市俊、結(jié)構(gòu)有序

? ? 2)位圖索引


? ? 3)函數(shù)索引


2:詳解BTREE索引

? 2.1)BTREE索引的結(jié)構(gòu)和原理

? ? ? ? 原理:索引入口頭部震鹉、列長度、列值闺金、ROWID、

? ? ? ? ? ? ? ROWID:數(shù)據(jù)詳細(xì)地址,通過ROWID快速定位某行具體的數(shù)據(jù)位置凤粗,64(A-Z,a-z,0-9,+,/),A=0考赛,a=27,0=53,+=62,/=63惕澎。

? ? ? ? ? ? ? ? ? ? 六位 data object_id?

? ? ? ? ? ? ? ? ? ? ? ? 不等于object_id

? ? ? ? ? ? ? ? ? ? ? ? select object_id,data_object_id from dba_objects;

? ? ? ? ? ? ? ? ? ? 三位 相對文件號

? ? ? ? ? ? ? ? ? ? ? ? select file#,Rfile#,ts#,name from v$datafile

? ? ? ? ? ? ? ? ? ? 六位 數(shù)據(jù)塊號

? ? ? ? ? ? ? ? ? ? ? ? 范圍:數(shù)據(jù)文件

? ? ? ? ? ? ? ? ? ? 三位 行號


? ? ? ? ? ? ? rowid轉(zhuǎn)化為文件號和塊號? ? ?

? ? ? ? ? ? ? select

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_object('AAASUVAABAAAU8LAAl') object,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_relative_fno('AAASUVAABAAAU8LAAl') file_num,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_block_number('AAASUVAABAAAU8LAAl') block_num,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_row_number('AAASUVAABAAAU8LAAl') row_number

? ? ? ? ? ? ? from dual;?

? ? ? ? 從ROWID推出各種的ORACLE數(shù)據(jù)限制? ? ? ? ? ? ? ? ?

? ? ? ? ROWID:以64位編碼顯示,但是以二進(jìn)制的方式存儲

? ? ? ? ? ? ? ? rowid用10個字節(jié)存儲颜骤,即80bit

? ? ? ? ? ? ? ? 32bit data_object_id? 4G個對象

? ? ? ? ? ? ? ? 10bit 相對文件號? ? ? 一個表空間最多只有1023個文件唧喉,不是1024,因為沒有O文件號

? ? ? ? ? ? ? ? 22bit 塊號? ? ? ? ? ? 一個數(shù)據(jù)文件最大4M個BLOCK塊 及32G

? ? ? ? ? ? ? ? 16bit 行號? ? ? ? ? ? 64K行數(shù)據(jù)


? ? ? ? ? ? ? alter system dump datafile 1 block 85771;

? ? ? ? ? ? ? select file#,Rfile#,ts#,name from v$datafile

? ? ? ? ? ? ? select spid from v$process where addr in (select paddr from v$session where

? ? ? ? ? ? sid=(select sid from v$mystat where rownum=1));

? ? ? ? ? ? ? show parameter dump

? ? ? ? ? ? ? select object_name,dump(object_name,1018) from weisi_t where object_id=222;


? ? ? ? ? ? ? select rowid,id,code,name,dump(name,1018) from characterset_test;

? ? ? ? ? ? ? AAASDEAABAAAVUxAAB

? ? ? ? ? ? ? ? select

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_object('AAASDEAABAAAVUxAAB') object,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_relative_fno('AAASDEAABAAAVUxAAB') file_num,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_block_number('AAASDEAABAAAVUxAAB') block_num ,

? ? ? ? ? ? ? ? ? dbms_rowid.rowid_row_number('AAASDEAABAAAVUxAAB') row_number

? ? ? ? ? ? ? from dual;

? ? ? ? ? ? ? ? ? alter system dump datafile 1 block 87345;

? ? ? ? ? ? ? ? select spid from v$process where addr in (select paddr from v$session where

? ? ? ? ? ? ? sid=(select sid from v$mystat where rownum=1));


? ? ? ? select object_type from dba_objects group by object_type order by 1;

? ? ? ? select * from dba_index


? ? ? 2.2)索引結(jié)構(gòu)


? ? ? ? ? ? 索引是物理結(jié)構(gòu)還是邏輯結(jié)構(gòu)忍抽?


? ? ? 2.3)索引的三大特性

? ? ? ? ? ? 1:索引高度低

? ? ? ? ? ? ? 2.3.1.1)構(gòu)建大表和普通表

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? create table normal_t_100 as select * from dba_objects where rownum< 100;

? ? ? ? ? ? ? create table big_t as select * from dba_objects;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? insert into big_t select * from big_t;

? ? ? ? ? ? ? select count(1) from big_t;

? ? ? ? ? ? ? 2.3.1.2)創(chuàng)建索引

? ? ? ? ? ? ? ? create index big_t_index on big_t(object_id);

? ? ? ? ? ? ? ? create index normal_index on normal_t(object_id);

? ? ? ? ? ? ? ? create index normal_t_100_index on normal_t_100(object_id);

? ? ? ? ? ? ? ? select segment_name,sum(bytes)/1024/1024 M from user_segments

? ? ? ? ? ? ? ? where segment_name in ('BIG_T_INDEX','NORMAL_INDEX','NORMAL_T_100_INDEX')group by segment_name;


? ? ? ? ? ? ? 2.3.1.3) 查看索引高度

? ? ? ? ? ? ? col index_name format a40

? ? ? ? ? ? ? set linesize 150

? ? ? ? ? ? ? select?

? ? ? ? ? ? ? ? ? ? ? index_name

? ? ? ? ? ? ? ? ? ? ? ,blevel

? ? ? ? ? ? ? ? ? ? ? ,leaf_blocks

? ? ? ? ? ? ? ? ? ? ? ,num_rows

? ? ? ? ? ? ? ? ? ? ? ,distinct_keys

? ? ? ? ? ? ? from user_ind_statistics

? ? ? ? ? ? ? where table_name? in ('BIG_T','NORMAL_T','NORMAL_T_100');? ?


? ? ? ? ? ? ? 2.3.1.4) 索引是性能提升利器


? ? ? ? ? ? ? ? cat $ORACLE_HOME/sqlplus/admin/plustrce.sql

? ? ? ? ? ? ? ? sqlplus / as sysdba

? ? ? ? ? ? ? ? @$ORACLE_HOME/sqlplus/admin/plustrce.sql

? ? ? ? ? ? ? ? grant plustrace to weisi;

? ? ? ? ? ? ? ? set autotrace on

? ? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? ? set timing on

? ? ? ? ? ? ? ? select * from big_t where object_id=111;

? ? ? ? ? ? ? ? create index big_t_index on big_t(object_id);

? ? ? ? ? ? ? ? select * from big_t where object_id=111;

? ? ? ? ? ? ? ? select * from normal_t where object_id=111;

? ? ? ? ? ? ? ? select * from normal_t_100 where object_id=111;



? ? ? ? ? ? ? ? 2.3.1.5) 分區(qū)索引(誤區(qū))

? ? ? ? ? ? ? ? ? 分區(qū)索引:全局索引和局部索引

? ? ? ? ? ? ? ? ? 分區(qū)條件和索引不同字段

? ? ? ? ? ? ? ? ? create table part_t

? ? ? ? ? ? ? ? ? ? ? ? partition by range(object_id)

? ? ? ? ? ? ? ? ? ? ? ? (

? ? ? ? ? ? ? ? ? ? ? ? ? partition p1 values less than (10000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p2 values less than (20000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p3 values less than (30000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p4 values less than (40000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p5 values less than (50000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p6 values less than (60000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p7 values less than (70000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p_max values less than (maxvalue)

? ? ? ? ? ? ? ? ? ? ? ? ? )

? ? ? ? ? ? ? ? ? ? ? ? ? as select * from dba_objects;


? ? ? ? ? ? ? ? ? ? create index part_t_local on part_t(data_object_id) local;


? ? ? ? ? ? ? ? ? create table part_t1

? ? ? ? ? ? ? ? ? ? ? ? partition by range(object_id)

? ? ? ? ? ? ? ? ? ? ? ? (

? ? ? ? ? ? ? ? ? ? ? ? ? partition p1 values less than (10000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p2 values less than (20000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p3 values less than (30000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p4 values less than (40000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p5 values less than (50000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p6 values less than (60000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p7 values less than (70000),

? ? ? ? ? ? ? ? ? ? ? ? ? partition p_max values less than (maxvalue)

? ? ? ? ? ? ? ? ? ? ? ? ? )

? ? ? ? ? ? ? ? ? ? ? ? ? as select * from dba_objects;


? ? ? ? ? ? ? ? ? create index part_t1_index on part_t1(data_object_id);? ? ? ?


? ? ? ? ? ? col segment_name format a25

? ? ? ? ? ? col partition_name format a25

? ? ? ? ? ? col segment_type format a25

? ? ? ? ? ? set linesize 200?

? ? ? ? ? ? select segment_name,partition_name,segment_type

? ? ? ? ? ? from user_segments

? ? ? ? ? ? where segment_name in ('PART_T','PART_T1','PART_T_LOCAL','PART_T1_INDEX');


? ? ? ? ? ? set autotrace traceonly

? ? ? ? ? ? set linesize 200

? ? ? ? ? ? select * from part_t where data_object_id=222 ;

? ? ? ? ? ? select * from part_t1 where data_object_id=222;

? ? ? ? ? ? select * from part_t where data_object_id=222 and object_id=10;

? ? ? ? ? ? select * from part_t1 where data_object_id=222 and object_id=10;


? ? ? ? ? ? create index normal_t_index on normal_t(data_object_id);

? ? ? ? ? ? select * from normal_t where data_object_id=222;


? ? ? ? ? ? --查看索引高度

? ? ? ? ? ? ? col index_name format a40

? ? ? ? ? ? ? set linesize 150

? ? ? ? ? ? ? select?

? ? ? ? ? ? ? ? ? ? ? index_name

? ? ? ? ? ? ? ? ? ? ? ,blevel

? ? ? ? ? ? ? ? ? ? ? ,leaf_blocks

? ? ? ? ? ? ? ? ? ? ? ,num_rows

? ? ? ? ? ? ? ? ? ? ? ,distinct_keys

? ? ? ? ? ? ? from user_ind_statistics

? ? ? ? ? ? ? where table_name? in ('PART_T','PART_T1','NORMAL_T')

? ? ? ? ? ? ? order by index_name;

? ? ? ? ? ? 修改意見:加上分區(qū)條件

? ? ? ? ? ? ? select * from part_t where data_object_id=222 and object_id=222;




? ? ? ? ? ? 2:索引存儲列值

? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;


? ? ? ? ? ? ? 1.count(*)優(yōu)化

? ? ? ? ? ? ? ? set autotrace traceonly

? ? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? ? select count(*) from normal_t;

? ? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? ? select count(*) from normal_t;

? ? ? ? ? ? ? ? select count(*) from normal_t where object_id is not null;

? ? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? ? create table normal_t as select * from dba_objects where 1=2;

? ? ? ? ? ? ? ? alter table normal_t modify object_id not null;

? ? ? ? ? ? ? ? insert into normal_t select * from dba_objects;

? ? ? ? ? ? ? ? select count(*) from normal_t;


? ? ? ? ? ? ? ? 任何情況下八孝,使用索引一定比全表掃描塊嗎?

? ? ? ? ? ? ? ? select * from normal_t;

? ? ? ? ? ? ? ? select /*+ index(NORMAL_T_INDEX) */? * from NORMAL_T where object is not null;


? ? ? ? ? ? ? 2.avg問題

? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? set autotrace traceonly

? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? select avg(object_id) from normal_t;

? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? select avg(object_id) from normal_t;




? ? ? ? ? ? 3:索引本身是有序

? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? 3.1)min/max優(yōu)化

? ? ? ? ? ? ? ? ? ? set autotrace on

? ? ? ? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? ? ? ? select min(object_id) from normal_t;

? ? ? ? ? ? ? ? ? ? select max(object_id) from normal_t;

? ? ? ? ? ? ? ? ? ? 為什么是兩次一致性讀鸠项??

? ? ? ? ? ? ? ? ? ? select count(*) from normal_t;

? ? ? ? ? ? ? ? ? ? 如果NORMAL_T表干跛,記錄增加100倍,MIN,MAX的邏輯讀是否會大量增加祟绊?

? ? ? ? ? ? ? select?

? ? ? ? ? ? ? ? ? ? ? index_name

? ? ? ? ? ? ? ? ? ? ? ,blevel

? ? ? ? ? ? ? ? ? ? ? ,leaf_blocks

? ? ? ? ? ? ? ? ? ? ? ,num_rows

? ? ? ? ? ? ? ? ? ? ? ,distinct_keys

? ? ? ? ? ? ? from user_ind_statistics

? ? ? ? ? ? ? where table_name='NORMAL_T';

? ? ? ? ? ? ? 3.2)min/max性能陷阱:INDEX FAST FULL SCAN楼入,INDEX FULL SCAN (MIN/MAX)

? ? ? ? ? ? ? ? ? ? select min(object_id),max(object_id) from normal_t;--是否能用到索引

? ? ? ? ? ? ? ? ? ? select min(object_id),max(object_id) from normal_t where object_id is not null;



? ? ? ? ? ? ? ? ? ? select min(object_id),max(object_id) from normal_t是否等價于

? ? ? ? ? ? ? ? ? ? select min(object_id) from normal_t;

? ? ? ? ? ? ? ? ? ? select max(object_id) from normal_t;


? ? ? ? ? ? ? ? ? ? select min,max from (select min(object_id) min from normal_t) a,(select max(object_id) max from normal_t) b;jianli

? ? ? ? ? ? ? 3.3)order by 優(yōu)化

? ? ? ? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? ? ? ? set autotrace traceonly

? ? ? ? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? ? ? ? select * from normal_t where object_id<70000;

? ? ? ? ? ? ? ? ? ? select * from normal_t where object_id<70000 order by object_id;


? ? ? ? ? ? ? ? ? ? 1:無ORDER BY 語句沒有排序,ORDER BY 語句有排序久免,1? sorts (memory)

? ? ? ? ? ? ? ? ? ? 2:無ORDER BY 的語句COST 290浅辙,完成時間4秒,ORDER BY 語句3250 阎姥,完成時間40秒

? ? ? ? ? ? ? ? ? ? 3:無ORDER BY 的一致讀5555,ORDER BY 一致讀1038 记舆,有排序的比沒排序的一致讀少

? ? ? ? ? ? ? ? ? ? ? ? 一致性讀的多運行時間少,一致性讀的少呼巴,運行時間長泽腮,SQL運行長短看COST值御蒲,不看一致性讀

? ? ? ? ? ? ? ? ? ? ? ? COST值越小性能越高,ORACLE執(zhí)行計劃選擇是由COST值決定的诊赊。

? ? ? ? ? ? ? ? ? ? 4:排序需要消耗大量的性能

? ? ? ? ? ? ? ? ? ? 優(yōu)化方法:

? ? ? ? ? ? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);? ?

? ? ? ? ? ? ? ? ? ? ? ? select * from normal_t where object_id<70000 order by object_id;


? ? ? ? ? ? ? ? ? ? ? ? select * from big_t where object_id<70000 order by object_id;

? ? ? ? ? ? ? 4 索引回表優(yōu)化

? ? ? ? ? ? ? ? 4.1) 索引回表讀 TABLE ACCESS BY INDEX ROWID

? ? ? ? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? ? ? ? set autotrace on

? ? ? ? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? ? ? ? select * from? normal_t where object_id< 100;? ?

? ? ? ? ? ? ? ? ? ? TABLE ACCESS BY INDEX ROWID


? ? ? ? ? ? ? ? ? ? select object_id from normal_t where object_id<100;

? ? ? ? ? ? ? ? ? ? 無TABLE ACCESS BY INDEX ROWID


? ? ? ? ? ? ? ? ? ? 解決方法:1:改變SQL寫法厚满,只取需要的數(shù)據(jù)

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2:建立聯(lián)合索引,聯(lián)合索引盡量不超過三個字段


? ? ? ? ? ? ? ? ? ? select object_name,object_id from normal_t where object_id<100;

? ? ? ? ? ? ? ? ? ? create index normal_t_index_2 on normal_t(object_name,object_id);

? ? ? ? ? ? ? ? ? ? select object_name,object_id from normal_t where object_id<100;

? ? ? ? ? ? ? ? ? ? create index normal_t_index_3 on normal_t(object_id,object_name);


? ? ? ? ? ? 5 聯(lián)合索引

? ? ? ? ? ? ? set autotrace on

? ? ? ? ? ? ? set linesize 200

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? select object_name from normal_t where object_id=100;

? ? ? ? ? ? ? create index normal_t_index_2 on normal_t(object_name,object_id);

? ? ? ? ? ? ? select object_name from normal_t where object_id=100;

? ? ? ? ? ? ? create index normal_t_index_2 on normal_t(object_id,object_name);?

? ? ? ? ? ? ? select object_name from normal_t where object_id=100;


? ? ? ? ? ? 6 索引監(jiān)控

? ? ? ? ? ? ? select * from v$object_usage;

? ? ? ? ? ? ? select object_name from big_t where object_id=100;

? ? ? ? ? ? ? select * from v$object_usage;

? ? ? ? ? ? ? alter index big_t_index monitoring usage;

? ? ? ? ? ? ? alter index big_t_index nomonitoring usage;

? ? ? ? ? ? ? select object_name from big_t where object_id=100;

? ? ? ? ? ? ? select * from v$object_usage;

? ? ? ? ? ? 6 建立索引引發(fā)的問題

? ? ? ? ? ? ? 1) 排序

? ? ? ? ? ? ? 2)鎖?

? ? ? ? ? ? ? ? ? create index big_t_index on big_t(object_id);

? ? ? ? ? ? ? ? ? select sid from v$mystat where rownum=1;

? ? ? ? ? ? ? ? ? select * from v$lock where sid=23

? ? ? ? ? ? ? ? ? update big_t set object_id=100 where object_id=10;

? ? ? ? ? ? ? ? ? select sid,type,id1,id2,

decode(lmode,0,'None',1,'Null',2,'Row share',3,'Row Exclusive',4,'Share',5,'Share Row Exclusive',6,'Exclusive') lock_mode,

decode(request,0,'None',1,'Null',2,'Row share',3,'Row Exclusive',4,'Share',5,'Share Row Exclusive',6,'Exclusive')

request_mode,block

from v$lock


? ? ? ? ? ? 6 索引的危害影響

? ? ? ? ? ? ? drop index normal_t_index;

? ? ? ? ? ? ? drop table normal_t;

? ? ? ? ? ? ? create table normal_t as select * from dba_objects where 1=2;

? ? ? ? ? ? ? set timing on

? ? ? ? ? ? ? insert into normal_t select * from dba_objects ;

? ? ? ? ? ? ? create index normal_t_index on normal_t(object_id);

? ? ? ? ? ? ? insert into normal_t select * from dba_objects ;


? ? ? ? ? ? ? 先刪除索引碧磅,再插入碘箍,最后在重建索引

? ? ? ? ? ? ? DML語句對索引的影響

? ? ? ? ? ? ? 1) insert into

? ? ? ? ? ? ? 2) delete

? ? ? ? ? ? ? 3) update



3:位圖索引

? ? ? ? ? set autotrace on

? ? ? ? ? alter table big_t modify object_id not null;

? ? ? ? ? select count(1) from big_t;

? ? ? ? ? create bitmap index index_batmap_t_status on big_t(object_type);

? ? ? ? ? select * from dba_indexes where table_name='BIG_T';

? ? ? ? ? select count(1) from big_t;


? ? ? ? ? select object_type,count(1) from big_t group by object_type;?

? ? ? ? ? select object_id,count(1) from big_t group by object_id;


? ? ? ? ? 插入

? ? ? ? ? SESSION 1 插入

? ? ? ? ? insert into big_t select * from dba_objects;

? ? ? ? ? session 2 插入

? ? ? ? ? insert into big_t select * from dba_objects;


? ? ? ? ? 位圖索引試用場合

? ? ? ? ? 1:位圖索引列大量重復(fù)

? ? ? ? ? 2:表極少更新


? ? ? ? ? 1)位圖索引列重復(fù)情況少

? ? ? ? ? ? ? create table normal_t as select * from dba_objects;

? ? ? ? ? ? ? create bitmap index index_batmap_t_object_id on normal_t(object_id);

? ? ? ? ? ? ? set autotrace on

? ? ? ? ? ? ? select /* +full(normal_t)*/count(1) from normal_t;

? ? ? ? ? ? ? select /* +index(index_batmap_t_object_id)*/count(1) from normal_t;

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市鲸郊,隨后出現(xiàn)的幾起案子丰榴,更是在濱河造成了極大的恐慌,老刑警劉巖秆撮,帶你破解...
    沈念sama閱讀 219,539評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件四濒,死亡現(xiàn)場離奇詭異,居然都是意外死亡职辨,警方通過查閱死者的電腦和手機(jī)盗蟆,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,594評論 3 396
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來舒裤,“玉大人喳资,你說我怎么就攤上這事〔衙浚” “怎么了骨饿?”我有些...
    開封第一講書人閱讀 165,871評論 0 356
  • 文/不壞的土叔 我叫張陵亏栈,是天一觀的道長台腥。 經(jīng)常有香客問我,道長绒北,這世上最難降的妖魔是什么黎侈? 我笑而不...
    開封第一講書人閱讀 58,963評論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮闷游,結(jié)果婚禮上峻汉,老公的妹妹穿的比我還像新娘。我一直安慰自己脐往,他們只是感情好休吠,可當(dāng)我...
    茶點故事閱讀 67,984評論 6 393
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著业簿,像睡著了一般瘤礁。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上梅尤,一...
    開封第一講書人閱讀 51,763評論 1 307
  • 那天柜思,我揣著相機(jī)與錄音岩调,去河邊找鬼。 笑死赡盘,一個胖子當(dāng)著我的面吹牛号枕,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播陨享,決...
    沈念sama閱讀 40,468評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼葱淳,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了抛姑?” 一聲冷哼從身側(cè)響起蛙紫,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎途戒,沒想到半個月后坑傅,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,850評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡喷斋,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,002評論 3 338
  • 正文 我和宋清朗相戀三年唁毒,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片星爪。...
    茶點故事閱讀 40,144評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡浆西,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出顽腾,到底是詐尸還是另有隱情近零,我是刑警寧澤,帶...
    沈念sama閱讀 35,823評論 5 346
  • 正文 年R本政府宣布抄肖,位于F島的核電站久信,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏漓摩。R本人自食惡果不足惜裙士,卻給世界環(huán)境...
    茶點故事閱讀 41,483評論 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望管毙。 院中可真熱鬧腿椎,春花似錦、人聲如沸夭咬。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,026評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽卓舵。三九已至南用,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背训枢。 一陣腳步聲響...
    開封第一講書人閱讀 33,150評論 1 272
  • 我被黑心中介騙來泰國打工托修, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人恒界。 一個月前我還...
    沈念sama閱讀 48,415評論 3 373
  • 正文 我出身青樓睦刃,卻偏偏與公主長得像,于是被迫代替她去往敵國和親十酣。 傳聞我的和親對象是個殘疾皇子涩拙,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,092評論 2 355

推薦閱讀更多精彩內(nèi)容