Slight performance tweak for insert query.