Working on sqlalchemy insert query optimization