pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
identify partitioning columns and best practices of partitioning in prod enviornments
3+ messages / 3 participants
[nested] [flat]

* identify partitioning columns and best practices of partitioning in prod enviornments
@ 2020-11-11 22:31 Atul Kumar <akumar14871@gmail.com>
  2020-11-11 22:58 ` Re: identify partitioning columns and best practices of partitioning in prod enviornments Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Atul Kumar @ 2020-11-11 22:31 UTC (permalink / raw)
  To: Raul Kaubi <raulkaubi@gmail.com>; +Cc: pgsql-general

Hi,

I want to about best practices of partitioning in prod environments
and how to identify partitioning columns.


Regards,
Atul





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: identify partitioning columns and best practices of partitioning in prod enviornments
  2020-11-11 22:31 identify partitioning columns and best practices of partitioning in prod enviornments Atul Kumar <akumar14871@gmail.com>
@ 2020-11-11 22:58 ` Ron <ronljohnsonjr@gmail.com>
  2020-11-11 23:47   ` Re: identify partitioning columns and best practices of partitioning in prod enviornments Michael Lewis <mlewis@entrata.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ron @ 2020-11-11 22:58 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 11/11/20 4:31 PM, Atul Kumar wrote:
> Hi,
>
> I want to about best practices of partitioning in prod environments
> and how to identify partitioning columns.

It depends on what you want to do.  If your purpose is to simplify the 
deletion of old records, then partition by an unchanging date field.
If your purpose is to increase locality of data (because many of your 
queries are an equality on a specific "group id"), then partition by that 
"group id" field.


-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: identify partitioning columns and best practices of partitioning in prod enviornments
  2020-11-11 22:31 identify partitioning columns and best practices of partitioning in prod enviornments Atul Kumar <akumar14871@gmail.com>
  2020-11-11 22:58 ` Re: identify partitioning columns and best practices of partitioning in prod enviornments Ron <ronljohnsonjr@gmail.com>
@ 2020-11-11 23:47   ` Michael Lewis <mlewis@entrata.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Lewis @ 2020-11-11 23:47 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>

On Wed, Nov 11, 2020 at 3:58 PM Ron <ronljohnsonjr@gmail.com> wrote:

> On 11/11/20 4:31 PM, Atul Kumar wrote:
> > Hi,
> >
> > I want to about best practices of partitioning in prod environments
> > and how to identify partitioning columns.
>
> It depends on what you want to do.  If your purpose is to simplify the
> deletion of old records, then partition by an unchanging date field.
> If your purpose is to increase locality of data (because many of your
> queries are an equality on a specific "group id"), then partition by that
> "group id" field.
>

Additionally, while partitioning is hugely improved in v12 (and perhaps 13,
I forget), there are still restrictions on what you can partition on & what
you can have a primary key on. Also of note that having more than hundreds
or low thousands of partitions may have a significant impact on planning
and execution times. It is a great tool, but sometimes is implemented badly
or prematurely and the cost may not be worth a theoretical benefit.

Are you just wanting to learn about partitioning, or do you have a specific
situation that you think would benefit from partitioning?

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-11-11 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 22:31 identify partitioning columns and best practices of partitioning in prod enviornments Atul Kumar <akumar14871@gmail.com>
2020-11-11 22:58 ` Ron <ronljohnsonjr@gmail.com>
2020-11-11 23:47   ` Michael Lewis <mlewis@entrata.com>

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