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.

Required fields*

3
  • I like this solution because it's very concise. Any thoughts about the performance of the solution that I posted below? stackoverflow.com/a/46775289/968244 Commented Oct 16, 2017 at 17:04
  • I was actually able to test it. I have a table with about 350k rows and it had 39 duplicates over 7 columns with no indices. I tried the GROUP BY solution first and it was taking over 30 seconds so I killed it. I then tried the USING solution and it completed in about 16 seconds. Commented Oct 16, 2017 at 17:15
  • 1
    @isapir: Like I mentioned back in 2014: NOT IN is conveniently short syntax, but EXISTS is faster. (Same as your completely valid query with the USING clause.) But there is a subtle difference. I added a note above. Commented Oct 17, 2017 at 4:01