From: Christophe Courtois <christophe.courtois@dalibo.com>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Big table and partition
Date: Sun, 15 Oct 2023 16:37:08 +0200
Message-ID: <c2dcb0ce-9172-438d-a754-557bfd55f0f2@dalibo.com> (raw)
In-Reply-To: <CAJk5AtYv5x9_j9HtRtt_7JE-p-Fs2sA_kb2u4fbNcwwsqNVqMQ@mail.gmail.com>
References: <CAJk5AtYv5x9_j9HtRtt_7JE-p-Fs2sA_kb2u4fbNcwwsqNVqMQ@mail.gmail.com>
Hi,
Le 14/10/2023 à 22:46, Rajesh Kumar a écrit :
> In my env, I have a table 30GB where data is getting inserted directly
> whenever the new block is created in block chain...
> I have been asked to do partition, i said manager since we are not at
> all using the past data, partition is not required. Instead we can stop
> the sync (downtime not required), change the name of table , create a
> new table with same structure with original name and keep only tis month
> data. Then sync the blockchain so that new data will come to newly
> created table and old data will be there simply as a storage as we r not
> selecting any query from old data...
In fact, you want to do manual partitioning.
Why reinvent the wheel?
> Note: on a longer run, data will keep on coming in whenever new block is
> created.
> Is that right ? Any suggestions ? Better options ?
What problem do you have to solve? 30 GB is not so big, but since when
do you store data? Will you purge the table? What is the main access key
of your queries (critical for the partitioning key)?
Without other information I'd say that if you never read the former
months again, partition by month, perhaps by year.
--
Christophe Courtois
Consultant DALIBO
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: christophe.courtois@dalibo.com, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Big table and partition
In-Reply-To: <c2dcb0ce-9172-438d-a754-557bfd55f0f2@dalibo.com>
* 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