New topic: 

Inserting huge amounts of data

<http://forums.realsoftware.com/viewtopic.php?t=47017>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        Carharttguy          Post subject: Inserting huge amounts of 
dataPosted: Thu Feb 21, 2013 2:53 pm                         
Joined: Wed Sep 17, 2008 2:45 pm
Posts: 220                Hello,

I try to insert huge amounts of data into a (local) mysql database.
I wanted to make something straightforward, so I created a thread with a for 
loop:

For i as BigInteger = 0 to Totaal
  Dim ep As EncryptedPair = Pairs.Value(i.Str)
  db.SQLExecute("INSERT INTO hashes('" + ep.Getal.Str + "', '" + ep.sha256 +"', 
'" + ep.sha512 +"'")
next


But, that takes hours (maybe days) to insert a few million rows, there must be 
a faster way isn't it?

Anyone had to deal with such a situation before?      
_________________
My native language is not English.  
                             Top                ktekinay          Post subject: 
Re: Inserting huge amounts of dataPosted: Thu Feb 21, 2013 2:59 pm              
                   
Joined: Mon Feb 05, 2007 5:21 pm
Posts: 460
Location: New York, NY                What about writing this data to a 
tab-separated text file, then using LOAD TEXT?

http://dev.mysql.com/doc/refman/4.1/en/loading-tables.html      
_________________
Kem Tekinay
MacTechnologies Consulting
http://www.mactechnologies.com/

Need to develop, test, and refine regular expressions? Try RegExRX.
  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to