When we deal with large amounts of data that are all going into the same database, running single instances of individual
INSERT commands can take a ridiculous amount of time and waste a considerable amount of I/O. What we need is a way to insert multiple items in one go.
In this chapter, we will look at the following:
executemany()to submit several
INSERTstatements in one go
At the end of the chapter, we will put these lessons to use in writing a conversion program that inserts the contents of a comma-separated value (CSV) file into MySQL.