主要過程如譚總書中的例子:
建立空的分割槽表
createtable t1(object_id int,object_name varchar2(60),created date)
partition by range(created)
partition p2009 values lessthan(to_date('2010-01-01','yyyy-mm-dd')),
partition p2010 values lessthan(to_date('2011-01-01','yyyy-mm-dd')),
partition pmax values less than(maxvalue)
建立本地分割槽索引:
create
index
t1_idx
ont1(object_name)
indextype
isctxsys.
context
local;
建立乙個結構與
t1一樣的臨時表
create
table
t1_temp
asselect
* from
t1;
準備資料檔案,格式如下:
"20","icol$","2009/6/3019:10:16"
"44","i_user1","2009/6/3019:10:16"
"28","con$","2009/6/3019:10:16"
"15","undo$","2009/6/3019:10:16"
"29","c_cobj#","2009/6/3019:10:16"
"3","i_obj#","2009/6/3019:10:16"
"25","proxy_role_data$","2009/6/3019:10:16"
"39","i_ind1","2009/6/3019:10:16"
"51","i_cdef2","2009/6/3019:10:16"
"26","i_proxy_role_data$_1","2009/6/3019:10:16"
"17","file$","2009/6/3019:10:16"
"13","uet$","2009/6/3019:10:16"
"9","i_file#_block#","2009/6/3019:10:16"
"41","i_file1","2009/6/3019:10:16"
"48","i_con1","2009/6/3019:10:16"
"38","i_obj3","2009/6/3019:10:16"
"7","i_ts#","2009/6/3019:10:16"
"53","i_cdef4","2009/6/3019:10:16"
"19","ind$","2009/6/3019:10:16"
"14","seg$","2009/6/3019:10:16"
"6","c_ts#","2009/6/3019:10:16"
"42","i_file2","2009/6/3019:10:16"
"21","col$","2009/6/3019:10:16"
"43","i_ts1","2009/6/3019:10:16"
"35","i_undo2","2009/6/3019:10:16"
"5","clu$","2009/6/3019:10:16"
"23","proxy_data$","2009/6/3019:10:16"
"24","i_proxy_data$","2009/6/3019:10:16"
"36","i_obj1","2009/6/3019:10:16"
"46","i_col2","2009/6/3019:10:16"
"37","i_obj2","2009/6/3019:10:16"
"54","i_ccol1","2009/6/3019:10:16"
"16","ts$","2009/6/3019:10:16"
用plsql工具匯入臨時表中
指定要匯入檔案的位置和要匯入的表
匯入結束
檢視臨時表中的資料:
給臨時表建立全文索引:
create
index
t1_temp_idx
ont1_temp(object_name)
indextype
isctxsys.
context;
交換alter
table
t1 exchange
partition
p2009
with
table
t1_temp
including
indexes
without
validation;
檢視結果:
可見全文索引基表的資料已經變更到了t1 表的第乙個分割槽中了,而臨時表的全文索引資料為空。
mysql全文索引的坑 MySQL全文索引問題
我有乙個包含以下資料的 文章 mysql select from articles id title body 1 mysql tutorial dbms stands for database 2 how to use mysql well after you went through a 3 o...
建立全文索引
建立全文索引 在進行全文檢索之前,必須先建立和填充資料庫全文索引。為了支援全文索引操作,sql server 7.0新增了一些儲存過程和transact sql語句。使用這些儲存過程建立全文索引的具體步驟如下 括號內為呼叫的儲存過程名稱 1.啟動資料庫的全文處理功能 sp fulltext data...
mysql全文索引
了解 solr 之後 發現全文索引也能做檢索 故了解了下 筆記如下 建立全文索引 alter table table add fulltext index fulltext table 列1 列2 查詢方式 select from table where match 列1 列2 against 查詢...