您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Oracle 测试常用表BIG_TABLE

2024/6/26 12:18:53发布22次查看
创建测试用表,dba经常用到,通常都是基于dba_objects来创建的比较多。本文根据tom大师的big_table进行了整理,供大家参考。 一、基于oracle 10g下的big_table --==============================================-- create a test table for oracle 10g-- fi
创建测试用表,,dba经常用到,通常都是基于dba_objects来创建的比较多。本文根据tom大师的big_table进行了整理,供大家参考。
一、基于oracle 10g下的big_table
--==============================================-- create a test table for oracle 10g-- file : cr_big_tb_10g.sql-- author : robinson-- blog : --==============================================promptpromptcreate a big table from all_objectsprompt ======================================create table big_tableas select rownum id, a.*from all_objects awhere 1=0;promptprompt modify table to nologgming modeprompt ==========================alter table big_table nologging;prompt promptplease input rows number to fill into big_tableprompt============================================declarel_cnt number;l_rows number := &1;begininsert /*+ append */into big_tableselect rownum, a.*from all_objects a;l_cnt := sql%rowcount;commit;while (l_cnt user,tabname => 'big_table',method_opt => 'for all indexed columns',cascade => true);end; /prompt promptcheck total rows for big_table prompt====================================select count(*)from big_table;二、基于oracle 11g下的big_table
--==============================================-- create a test table for oracle 11g-- file : cr_big_tb_11g.sql-- author : robinson-- blog : --==============================================promptpromptcreate a big table from all_objectsprompt ======================================create table big_tableas select rownum id, a.*from all_objects awhere 1=0;promptprompt modify table to nologgming modeprompt ==========================alter table big_table nologging;prompt promptplease input rows number to fill into big_tableprompt============================================declarel_cnt number;l_rows number := &1;begininsert /*+ append */into big_tableselect rownum, a.*from all_objects a;l_cnt := sql%rowcount;commit;while (l_cnt user,tabname => 'big_table',method_opt => 'for all indexed columns',cascade => true);end; /prompt promptcheck total rows for big_table prompt====================================select count(*)from big_table;
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product