Re: time-based range partitioning and truncate/delete different timezones

From: Niels Jespersen <NJN(at)dst(dot)dk>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: time-based range partitioning and truncate/delete different timezones
Date: 2021-01-15 21:11:44
Message-ID: 300DA319EA2F496EBA6F28EBF0EC97D7@com.citrix.mail.iOS
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="font-family:-apple-system, Calibri , HelveticaNeue , sans-serif;">
<div dir="auto">
<div dir="auto">
<div id="signature-div-B95D2988-9DF3-4E51-AEF4-3D672DB60076" dir="auto"><br>
<br>
</div>
<div id="122C45FC-10C3-43BF-9CFC-1D25D1DBD2BE" spellcheck="true" autocorrect="true" autosuggest="true" dir="auto">
<hr>
<div style="font-family:-apple-system,Calibri,HelveticaNeue,sans-serif;" dir="auto">
<br>
<b>Fra:</b> Michael Lewis &lt;mlewis(at)entrata(dot)com&gt;<br>
<b>Dato:</b> 15. januar 2021 kl. 19.49.32 CET<br>
<b>Til:</b> Niels Jespersen &lt;NJN(at)dst(dot)dk&gt;<br>
<b>Cc:</b> pgsql-general(at)postgresql(dot)org &lt;pgsql-general(at)postgresql(dot)org&gt;<br>
<b>Emne:</b> Re: time-based range partitioning and truncate/delete different timezones<br>
</div>
<br>
<br>
<div dir="ltr">What version are you using? How long are you keeping data for? It is possible to partition by hour or would that exceed the number of recommended partitions too quickly for your retention time period? Else, I would partition on date according
to the timezone of your data. Selecting from multiple partitions for the aggregate should be performant enough in most cases. The truncate / detach type commands may need to be the priority.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Version 12.1.&nbsp;</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">6. months retention, which would give about 4.400 partitions using hourly partitioning. Maybe partitioning on the same timezone as input data and in something like 6 hour intervals is the way to go. I will think about it, based on your input.&nbsp;</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thank you for your ideas</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Regards Niels</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-01-15 21:40:08 Re: Accounting for between table correlation
Previous Message David G. Johnston 2021-01-15 21:00:03 Re: Best tools to monitor and fine tune postgres