Re: R: Slow queries on very big (and partitioned) table

From: Rakesh Kumar <rakeshkumar464(at)outlook(dot)com>
To: Job <Job(at)colliniconsulting(dot)it>, 'Stephen Frost' <sfrost(at)snowman(dot)net>
Cc: Jaime Soler <jaime(dot)soler(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: R: Slow queries on very big (and partitioned) table
Date: 2017-02-21 21:58:36
Message-ID: MWHPR2201MB1565299932D564798DDB4ABC8C510@MWHPR2201MB1565.namprd22.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> We thought to implement one partition for day.

That would be 365 partitions in a year.

In our experience INSERTS suffers the most in a partitioned table because triggers are the only way to route the row to the proper child (inherited) table.

Question: How is your insert pattern? Do you insert always current date. In that case you can write the trigger code to have current date at the top so that the insert trigger finds the matching date as early as possible.

Selects, updates and deletes are reasonably better.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-02-21 21:59:00 Re: bloat indexes - opinion
Previous Message Job 2017-02-21 21:54:29 R: R: Slow queries on very big (and partitioned) table