check data size before insert