• Can't you just truncate the target table and reload it again instead of checking whether the record exists or not?

    This will give you a huge boost from the performance point-of-view.