Re: Choosing an index on partitioned tables.

2021-09-07 Thread Magnus Hagander
On Tue, Sep 7, 2021 at 12:15 PM Tim Uckun wrote: > > There is an image marked as official: https://hub.docker.com/_/postgres > > I presumed this was maintained by the postgres team. It is official *docker*, just not official *postgresql*. If you click their "maintained by" link you get to https:

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Tim Uckun
There is an image marked as official: https://hub.docker.com/_/postgres I presumed this was maintained by the postgres team. On Tue, Sep 7, 2021 at 9:59 PM Magnus Hagander wrote: > > On Tue, Sep 7, 2021 at 11:52 AM Tim Uckun wrote: > > > > It's weird that it's supported on AWS and many other

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Magnus Hagander
On Tue, Sep 7, 2021 at 11:52 AM Tim Uckun wrote: > > It's weird that it's supported on AWS and many other providers but not > in the official docker images. That'd be something to talk to the docker people about I guess? There are no official docker images published by *postgresql*. (And of cours

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Tim Uckun
It's weird that it's supported on AWS and many other providers but not in the official docker images. On Tue, Sep 7, 2021 at 9:16 PM Magnus Hagander wrote: > > On Tue, Sep 7, 2021 at 10:51 AM Tim Uckun wrote: > > > > To be fair Timescale also adds some other features which might be > > useful.

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Magnus Hagander
On Tue, Sep 7, 2021 at 10:51 AM Tim Uckun wrote: > > To be fair Timescale also adds some other features which might be > useful. For example they add some SQL enhancements like last value > and auto maintaining materialized views and such. The automatic > management of partitions is also pretty b

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Tim Uckun
To be fair Timescale also adds some other features which might be useful. For example they add some SQL enhancements like last value and auto maintaining materialized views and such. The automatic management of partitions is also pretty big plus in my opinion. You can get some of the equivalent f

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Tim Uckun
Thanks! That's great about the Btree deduplication feature in 13. On Tue, Sep 7, 2021 at 7:21 PM Laurenz Albe wrote: > > On Tue, 2021-09-07 at 15:44 +1200, Tim Uckun wrote: > > I have a series of tables which are going to be queries mostly on two > > columns. A timestamp table and a metric type

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Laurenz Albe
On Tue, 2021-09-07 at 04:06 +, Brent Wood wrote: > From: Tim Uckun > > My plan is to partition by date ranges which means the primary key has > > to include the timestamp column and the id columnĀ  As far as I know > > there is no way to specify an index type for those columns. > > > > The metr

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Laurenz Albe
On Tue, 2021-09-07 at 15:44 +1200, Tim Uckun wrote: > I have a series of tables which are going to be queries mostly on two > columns. A timestamp table and a metric type column. > > My plan is to partition by date ranges which means the primary key has > to include the timestamp column and the id

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Brent Wood
Hi Tim, I've had good success with TimescaleDB for large timesries databases (40b readings). https://www.timescale.com/ You turn your timestamp table into a Timescale hypertable and it looks after the indexing and partitioning automatically, with the table accessed like a normal postgres table

Re: Choosing an index on partitioned tables.

2021-09-06 Thread Tim Uckun
Hi Brent. I looked at timescaledb. It does make partitioning on date ranges automatic which is awesome and as you said it does add a couple of extra features on top of postgres but their cloud offering are much more expensive than buying a generic postgres instance from AWS. A generic t3.medium o