Multithreaded data insertion into MySQL using python

I am working on a project involving embedding a large amount of data into a database. I am wondering if anyone knows how to populate 2 or 3 tables in a database at the same time. An example or psueodecode would be helpful. Thanks to

+2


source to share


1 answer


If you have a lot of data to insert into the database at once, then you are probably interested in bulk loading the data. The ideal tool for this is a large volume downloader that probably comes with your database - Oracle, Microsoft SQL Server, Sybase SQL Server, and MySQL (to name those that come to mind) all have downloaders. For example, Microsoft has a large insert statement and a bcp program to do this task. I recommend that you study this rather than tweaking any tool in python, with or without threads.



+2


source







All Articles