Compare all the records in table "A" with each record in Table "B"

0

I am a programmer and rarely use a database, I came across an unusual situation of converting multiple .DBF files and saving everything in the database in their respective tables, however some files surpassed more than 3 million records, as a programmer I tried to work using a code that picked up each record from a column of table A and compared it to each of a column of table B and said how many there were in table B, but the software crashes because of this absurd amount, I searched Google and found a guy so-called "JOIN", would that help me in my problem? There are 3 million in table A and 3 million in table B, I need to automate this using the Oracle database, I need a query that automates this. Anybody know? (This is bad for bad programmer uses bank, sorry)

    
asked by anonymous 26.10.2015 / 23:52

1 answer

1

I understand. JOIN will not be very different from the comparison query you did before, it will probably hang in the same way, but one solution is to limit the number of records in the comparison up to a limit of 10,000 records for example or up to an ID x . After processing this amount you wait about 2 minutes and have to process another 10,000 records and so on understand? You can do this by programming the "sleep system" for these two minutes before you start processing again. Use a functional language to do this that will not hang. If you use Elixir / Erlang you can process the three million at a time.

In this example I created a thousand processes, but can create 3 million quietly:

link

$ elixir --erl "+P 3000000" -r chain.exs -e "Chain.run(3_000_000)"
    
27.10.2015 / 00:37