avoiding TransactionTooLarge exception