21 ms·
> We had a "reporting" database that was postgres 9.3 or 9.4 (can't remember). It was the same schema but was never pruned. Big no-no right there -- a reportin
by shrikant 11y ago
> We had a "reporting" database that was postgres 9.3 or 9.4 (can't remember). It was the same schema but was never pruned.
Big no-no right there -- a reporting database shouldn't have the same schema as your main transactional DB, because the latter is designed and built for write-heavy workloads, not reporting or analytical ones.
I'm pretty certain that a lot of the stuff happening in the CTEs could simply be designed as part of a "true" reporting schema and ETL'ed in as a batch job.