BUG: replace iterrows with itertuples in sql insert (GH6509)

Fixes #6509.

Should still add a test