Re: Which partition scheme makes sense for my time based IoT-datagrams?

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Which partition scheme makes sense for my time based IoT-datagrams?
Date: 2021-02-11 14:03:41
Message-ID: 20210211140341.GB1603@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2021-02-10 16:09:30 +0100, Thorsten Schöning wrote:
> I have a table storing datagrams from some IoT-devices, with one
> datagram per device per day most likely for around 75'000 devices
> currently. I want to test query performance with a partitioned table
> and am interested in the following queries mostly:
>
> * querying arbitrary datagrams by their ID
> * querying datagrams being X old based on some timestamp
> * 15 minutes

If you get one datagram per day, how it is useful to query all datagrams
received in the last 15 minutes? That's either a random sample (if
devices report at random times) or empty (if they all report at midnight
and it isn't just after midnight).

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brajendra Pratap 2021-02-11 15:19:58 Re: Unable to execute Query in parallel for partitioned table
Previous Message Peter J. Holzer 2021-02-11 13:51:54 Re: SV: Insertion time is very high for inserting data in postgres