I want to perform an SQL query that is logically equivalent to the following:

```
DELETE FROM pond_pairs
WHERE
  ((pond1 = 12) AND (pond2 = 233)) OR
  ((pond1 = 12) AND (pond2 = 234)) OR
  ((pond1 = 12) AND (pond2 = 8)) OR
  ((pond1 = 13) AND (pond2 = 6547)) OR
  ((pond1 = 13879) AND (pond2 = 6))

```

I will have hundreds of thousands `pond1`-`pond2` pairs. I have an index on `(pond1, pond2)`.

My limited SQL knowledge came up with several approaches:

1. Run the whole query as is.
2. Batch the query up into smaller queries with `n` `WHERE` conditions
3. Save the `pond1`-`pond2` pairs into a new table, and do a subquery in the `WHERE` clause to identify
4. Convert the python logic which identifies rows to delete into a stored procedure. Note that I am unfamiliar with programming stored procedures and thus this would probably involve a steep learning curve.

I am using postgres if that is relevant.