pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: dbatoCloud Solution <dbatocloud17@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Partition table Creation and Testing using Inherited method
Date: Wed, 03 Mar 2021 09:48:30 +0100
Message-ID: <7482c0a1ea0dba163e35160b4ee92ffb29052c2c.camel@cybertec.at> (raw)
In-Reply-To: <CAEz7P_s808_v372VzFvmf5vKN0Xp4F_cJRmMM9_6nvysgcEOGw@mail.gmail.com>
References: <CAEz7P_s808_v372VzFvmf5vKN0Xp4F_cJRmMM9_6nvysgcEOGw@mail.gmail.com>

On Wed, 2021-03-03 at 08:49 +0530, dbatoCloud Solution wrote:
> Someone guide me on partitioning, I used the declarative method( inheritance),
>  Created child tables, added check constraints and steps below which I mentioned it.
> 
> step1 #
> CREATE TABLE core.contact_transaction_history (
> 
> record_insert_datetime timestamp NULL,
> crm_contact_type_id int4 NULL
> );
> 
> step2#
> CREATE TABLE core.contact_transaction_history_Year_2016() INHERITS (core.contact_transaction_history_PartMar2021);
> CREATE TABLE core.contact_transaction_history_Year_2017() INHERITS (core.contact_transaction_history_PartMar2021);
> CREATE TABLE core.contact_transaction_history_Year_2018() INHERITS (core.contact_transaction_history_PartMar2021);

Don't use inheritance partitioning.

Upgrade to a recent PostgreSQL release and use declarative partitioning.

It is so much better when it comes to performance and maintenance costs.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (5+ messages)  latest in thread

Message-ID: <7482c0a1ea0dba163e35160b4ee92ffb29052c2c.camel@cybertec.at>
Permalink:  ../7482c0a1ea0dba163e35160b4ee92ffb29052c2c.camel@cybertec.at/
Also on:    postgresql.org/message-id/7482c0a1ea0dba163e35160b4ee92ffb29052c2c.camel@cybertec.at

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, dbatocloud17@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Partition table Creation and Testing using Inherited method
  In-Reply-To: <7482c0a1ea0dba163e35160b4ee92ffb29052c2c.camel@cybertec.at>

* 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