Too few rows expected by Planner on partitioned tables

2020-07-21 Thread Julian Wolf
Hello, A description of what you are trying to achieve and what results you expect: Our database is growing on a daily basis by about 2.5million rows per table (2 at the moment). Because of that, we decided to partition the data, especially, as we are pre-aggregating the data for weeks, months,

Re: Too few rows expected by Planner on partitioned tables

2020-07-21 Thread Justin Pryzby
On Tue, Jul 21, 2020 at 01:09:22PM +, Julian Wolf wrote: > Our problem is, that the planner always predicts one row to be returned, > although only a part of the primary key is queried. This problem exceeds > feasibility of performance rapidly - a query only involving a few days > already ta