-
re: testing
hi! Guys ,
I want to setup millions of rows of data on my home pc ..
OS : NT 4.0
Oracle 8i ..
the only user I have is scott ..
Anybody have any ideas on how to create and populate large tables
that contain millions of rows of data ...
without having to write a lot of inserts for every single row ..
thanks,
harish
thanks,
harish
-
Re: re: testing
Transportable tablespaces, import... You name it.
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g,12c
email: ocp_9i@yahoo.com
-
If you don't have a current table big enough for your needs and you don't mind the data being crap, try:
create table x as select * from y; -- assuming that y has some rows in it.
insert into x
select * from x;
/
Then just keep pressing '/' to multiply the number of rows in 'x' by two every time.
100000 rows
200000 rows
400000 rows
800000 rows etc....
-
If you want to use dbms_random function, then try this:
create table tamil_random_table
( RN NUMBER,
ID1 varchar2(30),
ID2 varchar2(30),
ID3 varchar2(30),
ID4 varchar2(30),
ID5 varchar2(30),
ID6 varchar2(30),
ID7 varchar2(30),
ID8 varchar2(30),
ID9 varchar2(30))
tablespace users
storage (initial 100m next 100m pctincrease 0);
execute dbms_random.seed(630522626) ;
insert into tamil_random_table
select rownum as RN,
substr(dbms_random.string('a',30),1,30) id1,
substr(dbms_random.string('a',30),1,30) id2,
substr(dbms_random.string('a',30),1,30) id3,
substr(dbms_random.string('a',30),1,30) id4,
substr(dbms_random.string('a',30),1,30) id5,
substr(dbms_random.string('a',30),1,30) id6,
substr(dbms_random.string('a',30),1,30) id7,
substr(dbms_random.string('a',30),1,30) id8,
substr(dbms_random.string('a',30),1,30) id9
from
( select 1
from dual
group by cube (1,1,1,1,1,1)
) table_a,
( select 1
from dual
group by cube (1,1,1,1,1,1)
) table_b
;
If you add 1 in the cube, the number of rows will be increased.
Tamil
Tamil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|