Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: reading random records with JDBC?
йенс мартин шлаттер wrote:
>> So I guess you are basically doing this
>> open SELECT * from tableA
>> open SELECT * from tableB
>> loop
>> fetch rowA
>> fetch rowB
>> compare and report
>> end loop
>>
>> so you get a report on Monday. Monday night, the DBA migrates the DB
>> to a new server, or maybe just reorganizes the file structure. No data
>> is changed. rerunning you program on Tuesday gives different results.
>> (Do you know why?)
>> This report tells you nothing really. So you are doing this
>> because...?
> > My report told me that the rows are matching, which is what we wanted > to see. > > JMS
The sample clause was mentioned before - how about reading from table A, using SAMPLE, and searching for corresponding entries from b (preferably using the primary key on B)?
If your samples are small (say - no more than 500), takes two round trips to the database, rest is in-memory processing. Should be lighting fast! Keywords: SAMPLE, FOR ALL, BULK COLLECT
-- Regards, Frank van Bortel Top-posting is one way to shut me up...Received on Tue Nov 27 2007 - 14:01:26 CST
![]() |
![]() |