Re: Hash partitioning, what function is used to compute the hash?

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Dennis Ryan <dennisr1963(at)outlook(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Hash partitioning, what function is used to compute the hash?
Date: 2020-05-11 13:08:46
Message-ID: CAHOFxGrT6jUAdoz3bKMzkM66jP6JsF5=4vAKJ3GMwkjBkuxKWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The documentation shows it is just a modulus operation. If you partition on
object_key % 3 then you will create three partitions for remainder values
0-2 for instance.

Afaik, hash partition doesn't have real world expected use cases just yet.
List or range is probably what you want to use.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-05-11 13:50:12 Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'
Previous Message Matthias Apitz 2020-05-11 06:54:50 Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'