From: Niels Jespersen <NJN@dst.dk>
To: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: time-based range partitioning and truncate/delete different timezones
Date: Fri, 15 Jan 2021 21:11:44 +0000
Message-ID: <300DA319EA2F496EBA6F28EBF0EC97D7@com.citrix.mail.iOS> (raw)
In-Reply-To: <CAHOFxGpZTTjRXb-YRg+iEnWttS0zMBO-SoZbNWtqPH-yxtw17g@mail.gmail.com>
References: <97f889bbea084fdb8cfd94e73ab1358d@dst.dk>
<CAHOFxGpZTTjRXb-YRg+iEnWttS0zMBO-SoZbNWtqPH-yxtw17g@mail.gmail.com>
<!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 <mlewis@entrata.com><br>
<b>Dato:</b> 15. januar 2021 kl. 19.49.32 CET<br>
<b>Til:</b> Niels Jespersen <NJN@dst.dk><br>
<b>Cc:</b> pgsql-general@postgresql.org <pgsql-general@postgresql.org><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. </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. </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>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: NJN@dst.dk, mlewis@entrata.com
Subject: Re: time-based range partitioning and truncate/delete different timezones
In-Reply-To: <300DA319EA2F496EBA6F28EBF0EC97D7@com.citrix.mail.iOS>
References: <97f889bbea084fdb8cfd94e73ab1358d@dst.dk> <CAHOFxGpZTTjRXb-YRg+iEnWttS0zMBO-SoZbNWtqPH-yxtw17g@mail.gmail.com> <300DA319EA2F496EBA6F28EBF0EC97D7@com.citrix.mail.iOS>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox