Re: Define hash partition for certain column values

From: Голубева Яна <ishsha(at)yandex(dot)ru>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Define hash partition for certain column values
Date: 2021-01-12 15:51:24
Message-ID: 684591610466070@mail.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<div>Values for the key partitioning column are generated randomly and I can't predict their distribution between ranges.</div><div>If I just create some ranges I won't have any guarantee that partitions will have similar amount of data. It is possible that I will have 2 or 3 extremely big partitions and a bit of data in others.</div><div> </div><div>Thank you,</div><div>Iana Golubeva</div><div><br /></div><div><br /></div><div>12.01.2021, 17:55, "Michael Lewis" &lt;mlewis(at)entrata(dot)com&gt;:</div><blockquote><div dir="ltr"><div dir="ltr">On Tue, Jan 12, 2021 at 1:21 AM Голубева Яна &lt;<a href="mailto:ishsha(at)yandex(dot)ru">ishsha(at)yandex(dot)ru</a>&gt; wrote:<br /></div><div class="f13ca48719c8a60033905b23b39675agmail_quote"><blockquote class="f13ca48719c8a60033905b23b39675agmail_quote" style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin:0px 0px 0px 0.8ex;padding-left:1ex"><div>List or range partitioning isn't suitable for my case.<br /></div><div>I am using a column of numeric(20) type as a base for partitioning. The values of the column are generated randomly. </div><div>So there will be too many partitions if I use list partitioning as is.<br /></div></blockquote><div><br /></div><div>Sorry, but why is range not suited for this? It would seem fairly trivial to create 50 or 1000 partitions to break up the range of values allowed by your field definition.</div></div></div>
</blockquote>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2021-01-12 15:55:06 Re: Define hash partition for certain column values
Previous Message Joel Jacobson 2021-01-12 15:16:41 Re: CASE WHEN idiomatic for functions with side-effect?