dbTalk Databases Forums  

Re: reading random records with JDBC?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Re: reading random records with JDBC? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: reading random records with JDBC? - 11-27-2007 , 02:01 PM






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


Reply With Quote
  #12  
Old   
Ed Prochak
 
Posts: n/a

Default Re: reading random records with JDBC? - 11-27-2007 , 11:00 PM






On Nov 27, 5:08 pm, " " <MfwEwkCtz... (AT) spammotel (DOT) com>
wrote:
Quote:
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)?

This is a very good idea, thank you!
But it means that the program has to find out what the primary key is
and which type it is. But it could work.

JMS

Aha! He can be taught!

With the Primary Key, you searches will be MUCH faster. This is the
direction I clumsily tried to lead you toward.

You do not care what the type of the PK columns are. For there to be
corresponding rows the types must just match between the tables. For
you to compare rows, you must alredy know the columns are of the same
type.

Much better.
Ed


Reply With Quote
  #13  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: reading random records with JDBC? - 11-28-2007 , 12:09 PM



йенс мартин шлаттер wrote:
Quote:
Yes, but this is very complicated. The primary key can consist of 20
different columns
I don't want to know.
No - I don't!

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...


Reply With Quote
  #14  
Old   
Ed Prochak
 
Posts: n/a

Default Re: reading random records with JDBC? - 11-29-2007 , 01:19 PM



On Nov 28, 1:09 pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com>
wrote:
Quote:
wrote:

Yes, but this is very complicated. The primary key can consist of 20
different columns

I don't want to know.
No - I don't!

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
I give up too. he's using the tables as if they were files.

I'm done here.
Ed


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.