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

Home -> Community -> Usenet -> c.d.o.misc -> Re: reading random records with JDBC?

Re: reading random records with JDBC?

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Tue, 27 Nov 2007 21:01:26 +0100
Message-ID: <fii1ic$m5d$1@news4.zwoll1.ov.home.nl>


йенс мартин шлаттер 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

Original text of this message

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