# Generating unique integer hashes from text

**URL:** <https://forum.elixirforum.com/t/generating-unique-integer-hashes-from-text/33342>\
**Category:** Questions\
**Tags:** optimization\
**Created:** [July 25, 2020, 11:10am UTC](https://forum.elixirforum.com/t/generating-unique-integer-hashes-from-text/33342 "2020-07-25T11:10:03Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![NobbZ](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/32/27235_2.png) [@NobbZ](https://forum.elixirforum.com/u/NobbZ)\
**Post date:** [July 25, 2020, 11:22am UTC](https://forum.elixirforum.com/t/generating-unique-integer-hashes-from-text/33342/4 "2020-07-25T11:22:33Z")

</div>

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.

---

_[View the full topic](https://forum.elixirforum.com/t/generating-unique-integer-hashes-from-text/33342)._
