lowered batch sql INSERT operation to 10_000 per query
making searches more efficient by SELECTing id
removed debug print to decrease noise
style and readablity