Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Merge Data Sets

Merge Data Sets

From: Andy Johnson <AJohnson_at_Armature.com>
Date: Wed, 26 Sep 2001 16:42:12 +0100
Message-ID: <783866CAB183D211883F0090271F46C20886EA0B@COW>


HI,

One crucial factor that i forgot to mention is that the two table are of differing sizes..

small tab ==> 40,000
large tab ==> 23,000,000

easiest way i've done it so far is as

small tab



create table tab_a_tmp as select sequence.nextval,cola,colb from tab_a unrecoverable.

large tab



second table data relationship is not important but just need random non unique join key..

create table tab_b_tmp as select
floor(dbms_random.value(1,40000)),cola,colb,colc from tab_b unrecoverable.

rename tables.

i've got it doing 5 million rows in under 10 mins..

regards

andy

-----Original Message-----
From: Thomas Schwickert [mailto:schwickert_at_yahoo.com] Posted At: Wednesday, September 26, 2001 4:23 PM Posted To: server
Conversation: Merge Data Sets
Subject: Re: Merge Data Sets

Hi,

without seeing much sense ...

"Andy Johnson" <AJohnson_at_Armature.com> wrote in message news:783866CAB183D211883F0090271F46C20884E0B1_at_COW...

> Hi,
> Does anyone have any experience with merging two data sets that have
no
> relationship whatsoever. for example.
>
> Table X ( Acol varchar2,Bcol varchar2,dob date)
>
> Table Y (XCol Number)
>
> |
> |
>
> Table Z (XCol number, Acol varchar2,Bcol varchar2,dob date)
>
> these table have no join key and thier is around 25 million rows..
>

how about

create table z as
select t1.*,t2.* from
(select rownum a,a.* from x a) t1
,(select rownum b,b.* from y b) t2
where t1.a=t2.b

Hth
 Thomas

-- 
Posted from  [212.20.131.226] 
via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Wed Sep 26 2001 - 10:42:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US