Umair Shahid explains when hash and range partitioning work best:
I have always been a fan of RANGE partitioning using a date/time value in PostgreSQL. This isn’t always possible, however, and I recently came across a scenario where a table had grown large enough that it had to be partitioned, and the only reasonable key to use was a UUID styled identifier.
The goal of this post is to highlight when and why hashing your data across partitions in PostgreSQL might be a better approach.
Click through to learn more about each style of partitioning, as well as when hash partitioning may actually be the better fit.