Portfolio / Projects / HortiTrace · Final-Year Project

Production Analytics Engineering · Final-year internship

Make an analytics pipeline faster without breaking business workflows.

A 6.3M-row PostgreSQL transaction table at the core of the warehouse was loaded through MyReport Data with an expensive full reload while balance reports were slowing down. I optimized both ends of the pipeline without changing reports, dashboards or user workflows.

−80%ETL duration30 min → 6 min
−95%Rows reloaded6.3M → ~312k
−83%Reporting>60 s → <10 s
0Data discrepancies7 tests · 6,425 partners

Tools & technologies

PostgreSQLPL/pgSQLpgAgentMyReport DataMyReport BEMicrosoft Azure VM

01 / Overview

The same issue existed at both ends of the chain: too much data was being reprocessed.

HortiTrace uses a PostgreSQL warehouse to produce balance reports. Once the central transaction table reached 6.3 million rows, full reloads and repeated reporting calculations became increasingly expensive.

Business constraint

Keep existing reports unchanged.

ERP sources, the MyReport layer and user workflows had to remain compatible.

Engineering objective

Do less work on every run.

Reduce the amount loaded and scanned instead of optimizing one isolated query.

02 / MyReport in production

MyReport was the BI backbone of the internship, not just a reporting tool.

I worked across several modules of the MyReport BE suite, from warehouse loading to operational monitoring, report development and distribution. That continuity between ETL, data modeling and BI consumption is a major reason this project now represents my Analytics Engineering positioning.

01

MyReport Data

ETL, source models and migration from full reload to incremental loading.

02

Administrator

Execution monitoring, scheduling, operational checks and day-to-day administration.

03

Builder

Development, maintenance and validation of business reports in the Excel environment.

04

Messenger

Automation and control of report distribution to operational teams.

05

Page

Creation and maintenance of visual dashboards for operational monitoring.

06

Center

Consumption and verification of business indicators, dashboards and validated operational outputs.

MyReport pipeline from business sources to BI delivery

Simplified functional diagram without confidential internal details.

03 / Diagnosis

The ETL reloaded 6.3M rows on every cycle although only recent records could still change.

ETL

Full reload

~30 minutes per cycle and 6.3 million transaction rows processed again.

Reporting

Expensive balance reconstruction

~6.1 million rows scanned and more than one minute for some reports.

Root cause: total warehouse growth increased cost even when very little data had actually changed.

04 / Architecture

I separated ingestion logic, stable reads and the analytics-serving layer.

The original transaction model was preserved. MyReport Data was reconfigured to load only the recent window, while derived physical tables provided stable reads and historical pre-aggregation. The MyReport reporting layer continued to operate without any report changes.

The trick wasn’t to make the server work harder. It was to stop asking it to repeat itself.

GUIDED READING · ARCHITECTURE

Two architectures, one goal: keep business reports unchanged.

HortiTrace before-and-after comparison: full reload, then incremental pipeline with stable history
What changed: the volume reloaded and scanned. What did not: reports, dashboards and user workflows.
01

Incremental loading

Reload only the last 92 days because older ERP records can no longer be modified.

02

Stable copy

Build in staging and atomically rename so reports never read a partially refreshed table.

03

Pre-aggregated reporting

Pre-aggregate historical balances before combining them with recent transactions, sharply reducing scan volume.

05 / Engineering decisions

The architecture followed the constraints of the existing production system.

Loading92-day incremental window

Full-reload cost grew with the cumulative history. The source system’s immutability rule provided a reliable boundary for restricting processing to records that could still change.

Choice: reload by creation date over a rolling 92-day window, including a two-day safety margin around the three-month immutability rule.

Analytics layerIndependent physical table

A materialized view would have been fragile around weekly MyReport source rebuilds and their dependencies.

Choice: an independent physical table refreshed in a controlled way.

ConsistencyAtomic staging-and-rename

TRUNCATE + INSERT could expose an empty or partial table for several minutes.

Choice: build alongside the active table and switch with a rename operation.

06 / Project management

Technical autonomy, shared validation and controlled decisions.

As the primary developer on the optimization project, I led the diagnosis, design and implementation with a high degree of autonomy under my company supervisor’s oversight. Progress, issues and technical choices were discussed through regular debriefs and weekly reviews of roughly 30 to 45 minutes.

These exchanges connected technical decisions to operational consequences. Major milestones, validation results and the production move were reviewed before the Go/No-go decision.

01

Diagnosis & design

Measure the existing system, identify root causes and frame the two target architectures.

02

Development & iteration

Build in the test environment, resolve discrepancies and revalidate after each major decision.

03

Validation & release

Run the seven-test protocol, review the results with the company supervisor, confirm the Go/No-go and deploy in dependency order.

04

Documentation

Maintain operating, renewal and recovery procedures in parallel so the solution remained transferable.

Planning

Milestones & dependencies

Tracked in Notion through a timeline of phases, milestones and dependencies between design decisions and implementation work.

Quality

Decision gates

Zero data discrepancy acted as the promotion criterion, with validation required before a component moved to the next stage.

Risk

Risk register

Data integrity, reporting continuity and ETL-tool compatibility were tracked with dedicated mitigation measures.

Management principle: no component moved forward without prior validation of correctness, consistency and operational safety.

07 / Production release

A production release prepared, checked and executed step by step.

The April 3, 2026 production release followed a prepared sequence:

  1. synchronize test data;
  2. run the seven controls;
  3. hold the technical Go/No-go review;
  4. deploy objects in dependency order;
  5. validate production data;
  6. confirm the reports;
  7. only then enable pgAgent jobs.
Synchronize→7 tests→Go / No-go→Deploy→Validate→Check reports→Enable jobs
Guardrail: no scheduled processing was enabled before production data and reports were verified.

08 / Validation

Performance only mattered if the results stayed identical.

Control 01

Balances by partner

Compared balances for roughly 6,425 logistics partners.

Control 02

Partner × item

Compared roughly 37,500 partner-item combinations.

Release criterion: all seven tests had to pass with zero discrepancy before Go/No-go and were then rerun against production data.

09 / Results

The gain came from structurally reducing unnecessary work.

MetricBeforeAfterChange
ETL pipeline~30 min~6 min−80%
Rows reloaded6.3M~312k−95%
Rows scanned~6.1M~530k−91%
Report generation>60 s<10 s−83%
Reports changed:0No change
DeploymentApril 3, 2026

Zero balance discrepancies, no report modifications and no operational disruption observed during the post-release observation period.

External validation

Assessment & recognition

Two signals complement the technical metrics: the final-year project assessment and direct recognition from the company.

Final internship assessment17.10 / 20

Overall final-year internship assessment combining two supervisor evaluations and the MSc defense.

Company recognitionExceptional bonus

Awarded by HortiTrace in addition to the standard internship compensation.

Operational conclusion: the gain does not come from a more powerful server, but from an architecture that stops reprocessing history unnecessarily. The numbers stay identical and existing reports remain unchanged; for business users, the difference is faster data availability and much more responsive reporting.

10 / Takeaways

This project summarizes my Analytics Engineering positioning.

Engineering side

  • Performance diagnosis
  • Incremental PostgreSQL ETL
  • PL/pgSQL and pgAgent
  • Production release and rollback thinking
  • Production validation

Analytics side

  • MyReport Data & source models
  • Builder · Page · Center · Messenger
  • Reporting-oriented pre-aggregation
  • Reduced query cost
  • Measured business impact

Confidentiality: the source code belongs to HortiTrace SAS. This case study presents architecture, decisions and measured results without exposing internal names or proprietary implementation details.

Next project

Food Price Analytics: analyze twenty years of food prices in Cameroon.