-
Book Overview & Buying
-
Table Of Contents
MySQL for Python
By :
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:
How iteration can help us execute several individual INSERT statements rapidly
Using executemany() to submit several INSERT statements in one go
When not to use executemany()
Throttling how much data is inserted at a time
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.
Change the font size
Change margin width
Change background colour