re: testing
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: re: testing

  1. #1
    Join Date
    Jan 2004
    Posts
    58

    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

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    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

  3. #3
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    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....

  4. #4
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    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
  •  


Click Here to Expand Forum to Full Width