0002 · The research store is DuckDB over Parquet
Status: accepted, 2026-09-23. Not yet proven.
Context
The data platform (§18) must answer "what did we know on date X" over prices, fundamentals, filings and macro, with vintages and restatements, across a whole universe. The Lab (§17) scans large tables repeatedly. None of this is on the money path, and none of it needs concurrent writers.
Decision
Research data is stored as Parquet files in the blob store (0003), partitioned by dataset and vintage, and queried with DuckDB embedded in the process that needs it. There is no research database server.
Alternatives
- ClickHouse. Faster at very large scale. Rejected: a server to operate, and the fund's tables are not large enough to need it.
- PostgreSQL with extensions for time series. Rejected: it mixes research load into the Record's database, and a runaway Lab query must never slow the kernel.
- A vendor's hosted store. Rejected: point-in-time behaviour would be the vendor's, not the fund's, and not replayable.
Consequences
- Every vintage is an immutable file, which makes point-in-time queries and replay natural.
- Research and the Record fail independently.
- Concurrency is per process. A second analyst process reads, never writes, the same files.
Falsifier
- A point-in-time query over the full universe for one date takes longer than the research budget allows (spike 2 records the number);
- vintages or identifier changes cannot be represented without rewriting history.
Validated by
Spike 2 (point-in-time data). Measurements: to be written here.