Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Comparison of two tables
raghu wrote:
> Hi,
>
> I was looking at an optimized way in pl/sql to compare the data from
> tables in two different databases (Oracle 9i). Is there any alternate
> to opening cursors for each of the two tables and looping through them?
> The table has a few millions of records.
>
> Thank you.
Any time you _don't_ have to use pl/sql you could be optimized. So
MINUS might work for you. See
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1004115105172
(read the whole thing).
Also, in long-ago times I would put the data into flat files and use unix tools, which you may consider if you indeed have two different databases in the Oracle sense (as opposed to other brands senslessnesses), although dblinks may work for some configurations.
jg
-- @home.com is bogus. "The fountain of youth is pure java." - Dr. ScienceReceived on Thu Nov 17 2005 - 19:13:44 CST
![]() |
![]() |