Have you tried if solving this at the database by adding an index on that column is quick enough?
By relying on the suggested phash2/1,2, it will be hard to re-apply the technique from another language if necessary later on.
Have you tried if solving this at the database by adding an index on that column is quick enough?
By relying on the suggested phash2/1,2, it will be hard to re-apply the technique from another language if necessary later on.