@vladisld Enjoyed the video. Believe the issue in the code was that it was iterating over rows and writing 1 row at a time to the database...
Can now write 13 years of 1 minute data in ~50 seconds. Needed to batch_size=10000 for it to work on a large data-set.
Problem solved. Now the real work begins.