Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 2
    The same question has been answered in more detail here: stackoverflow.com/a/8290958 Commented Jun 22, 2015 at 14:21
  • In case anyone else doesn't know (like I did until recently), disabling or deleting triggers (which PostgreSQL uses internally for constraints too) can improve the performance of bulk deletions by several orders of magnitude. Given that the original question mentions recurring (daily) bulk imports, I imagine that was being done for the relevant tables already. Commented Dec 23, 2020 at 20:38