Getting by list of ids: `unnest() JOIN` vs `= ANY()`
You can see one difference in the plans, one has an estimated row count of 100, the other has a (correct) estimated row count of 42.  (Note that this is fixed in v12, where UNNEST has been taught to count its input size when given a constant array, rather than just blindly reporting an estimate of 100).  This could become important if the difference were larger than 42 vs 100, and if you added further joins (or other complexities) to the query.


  One thing that I thought of was that unnest can work for a composite key lookup (searching by two indexed fields, not just one).


How would you use UNNEST for this, where you can't use =ANY equivalently instead?  Usually a VALUES list is used for this (which also has its own issues, which also differ from version to version.)