Upsert instead of plain insert. when populating db. INCREDIBLY SLOW.