国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

用d_ba_objects來創建測試大表的方法

2019-11-02 15:39:34
字體:
來源:轉載
供稿:網友

   個人實驗的時候有時會用到一些大表,在此分享用dba_obje

中國未解之謎[www.9-39.com/html/mystery/]
cts來創建測試大表的方法:

  首先建立測試表

  [email protected]>create table test nologging as select rownum id,a.* from dba_objects a where 1=2;

  Table created.

  插入500萬條數據:

  [email protected]>declare

  l_cnt number;

  l_rows number:=&1;

  begin

  insert /*+ append */ into test select rownum,a.* from dba_objects a;

  l_cnt:=sql%rowcount;

  commit;

  while(l_cnt

  loop

  insert /*+ append */ into test select rownum+l_cnt,

  owner,object_name,subobject_name,

  object_id,data_object_id,

  object_type,created,last_ddl_time,

  timestamp,status,temporary,

  generated,secondary

  from sales

  where rownum<=l_rows-l_cnt;

  l_cnt:=l_cnt+sql%rowcount;

  commit;

  end loop;

  end; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

  22 /

  Enter value for 1: 5000000

  old 3: l_rows number:=&1;

  new 3: l_rows number:=5000000;

  PL/SQL procedure successfully completed.


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 喜德县| 武冈市| 开封市| 嘉祥县| 宁波市| 正蓝旗| 昌江| 南召县| 拉孜县| 泗水县| 涟水县| 根河市| 小金县| 桂东县| 普兰店市| 杭锦旗| 阿坝县| 望奎县| 密山市| 易门县| 扎兰屯市| 鹿泉市| 台山市| 嘉荫县| 英吉沙县| 霍林郭勒市| 霸州市| 获嘉县| 阳山县| 邻水| 绥江县| 确山县| 南投县| 永顺县| 尚义县| 常熟市| 桂平市| 修文县| 彝良县| 吉安县| 宁国市|