Re: Table performance with millions of rows (partitioning)

2017-12-27 Thread pinker
No, it's unfortunately not possible. Documentation says in Caveats part: /Constraint exclusion only works when the query's WHERE clause contains constants (or externally supplied parameters). For example, a comparison against a non-immutable function such as CURRENT_TIMESTAMP cannot be optimized,

Re: Table performance with millions of rows (partitioning)

2017-12-27 Thread Robert Blayzor
On Dec 27, 2017, at 8:20 PM, Justin Pryzby wrote: > > That's one of the major use cases for partitioning (DROP rather than DELETE > and > thus avoiding any following vacuum+analyze). > https://www.postgresql.org/docs/10/static/ddl-partitioning.html#DDL-PARTITIONING-OVERVIEW That’s the plan to

Re: Table performance with millions of rows (partitioning)

2017-12-27 Thread Justin Pryzby
On Wed, Dec 27, 2017 at 07:54:23PM -0500, Robert Blayzor wrote: > Question on large tables… > > When should one consider table partitioning vs. just stuffing 10 million rows > into one table? IMO, whenever constraint exclusion, DROP vs DELETE, or seq scan on individual children justify the minor

Table performance with millions of rows

2017-12-27 Thread Robert Blayzor
Question on large tables… When should one consider table partitioning vs. just stuffing 10 million rows into one table? I currently have CDR’s that are injected into a table at the rate of over 100,000 a day, which is large. At some point I’ll want to prune these records out, so being able t