On 3/3/11 Thu Mar 3, 2011 9:16 AM, "vito pascali" <vito.pasc...@gmail.com> scribbled:
> Hi there, > I'm really new to perl and programmation too so don't bear on me if I will > say something wrong pls... :) > > The problem: > > I have 3 querys to 2 different oracle databases: [queries snipped] > I need that the results from the query L1 is checked against the results > from the query G1 and that what differs between will be checked finally > against the results of G2. The most efficient way would be to arrange to have the Oracle database engine do most of the comparisons. I am not enough of a database expert to recommend ways to do this. The fastest way to do this in Perl would be to save the results of one query in memory in a data structure of some type, either an array or a hash. Then, as the results from the second query are fetched, compare against the copy in memory and save what differs (you have not explained how to decide when the two results differ). This will be possible only if the results from one query will fit into available memory. To maximize the probability of that happening, save the query with the least amount of data. > The problems are: > > 1)the results are huge, specially what come from G1; How huge? Some representative numbers would help. > 2)2 of the 3 arrays (@G1 e @L1) and one not (@G2); I do not understand what you are saying. Are you saying that queries G1 and L1 are huge and G2 is not? > 3)I'm really a newbie.... We were all newbies at one time. > > So what would be for you the best (and the fastest) way to do the job? > Example,link and RTFM are really appreciate! This is a rather specific problem for which you are unlikely to find a pre-packaged solution, but you might get lucky. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/