This page is the quickest way to inspect the current schema before going table by table.
All row counts and table sizes below come from the live data/pyvalue.db snapshot on 2026-07-28. Sizes refer to the table object's own pages, not the size of its secondary indexes.
| Table |
Rows |
Table size |
Primary key |
Main logical refs |
Initial review focus |
| provider |
1 |
4.0 KiB |
provider_id |
referenced physically by provider_exchange and provider_listing |
keep the registry narrow and avoid leaking runtime config into it |
| exchange |
73 |
12.0 KiB |
exchange_id |
referenced physically by provider_exchange.exchange_id and listing.exchange_id |
keep the canonical exchange table narrow and indexed for provider-catalog resolution |
| provider_exchange |
70 |
12.0 KiB |
provider_exchange_id |
maps provider exchange codes to canonical exchange identity |
check whether provider-owned exchange metadata belongs here and whether exchange-slice rewrites stay cheap |
| issuer |
58,562 |
58.7 MiB |
issuer_id |
referenced physically by listing.issuer_id |
separate issuer metadata from listing identity and keep updates cheap |
| listing |
75,680 |
3.2 MiB |
listing_id |
canonical root for facts, prices, metrics, and primary-listing status |
maintain fast lookup by (exchange_id, symbol) and keep canonical status semantics clear |
| provider_listing |
71,322 |
1.3 MiB |
provider_listing_id |
links provider catalog rows to canonical listing_id |
highest-priority provider catalog table; review provider slice rewrites and lookup indexes |
| Table |
Rows |
Table size |
Primary key |
Main logical refs |
Initial review focus |
| fundamentals_raw |
71,057 |
15.33 GiB |
provider_listing_id |
provider_listing_id in provider_listing |
wide-row storage, JSON payload size, hash versioning, and latest-row-only semantics |
| fundamentals_fetch_state |
0 |
4.0 KiB |
provider_listing_id |
provider_listing_id in provider_listing |
active retry/backoff rows only; success is derived from raw payloads |
| fundamentals_normalization_state |
56,814 |
6.0 MiB |
provider_listing_id |
provider_listing_id in provider_listing |
payload-hash watermark minimality |
| market_data_fetch_state |
57,116 |
2.8 MiB |
provider_listing_id |
provider_listing_id in provider_listing |
same pattern as fundamentals state; check duplication vs simplicity |
| provider_market_data |
310,527 |
19.8 MiB |
provider_listing_id, as_of |
provider_listing_id in provider_listing |
provider-layer price observations; purged with the provider listing while canonical market_data is retained |
| Table |
Rows |
Table size |
Primary key |
Main logical refs |
Initial review focus |
| financial_facts |
105,960,531 |
7.51 GiB |
listing_id, concept, fiscal_period, end_date |
listing_id in listing |
hottest fact table; check row width, nullable PK parts, and latest-fact indexes |
| financial_facts_refresh_state |
60,959 |
2.4 MiB |
listing_id |
listing_id in listing |
verify it still adds value beyond fundamentals_normalization_state |
| market_data |
324,778 |
20.6 MiB |
listing_id, as_of |
listing_id in listing |
canonical, provider-free price series (provenance in provider_market_data); latest-snapshot access and time-series retention |
| metrics |
3,406,573 |
194.2 MiB |
listing_id, metric_id |
listing_id in listing |
screen-read performance and lack of historical versions |
| metric_compute_status |
5,693,646 |
1.31 GiB |
listing_id, metric_id |
listing_id in listing |
status-survey read shape and duplication with metrics freshness; written only by compute-metrics |
| Table |
Rows |
Table size |
Primary key |
Main logical refs |
Initial review focus |
| fx_supported_pairs |
994 |
104.0 KiB |
provider, symbol |
canonical pair used by fx_refresh_state |
alias vs canonical pair modeling |
| fx_refresh_state |
942 |
80.0 KiB |
provider, canonical_symbol |
logical ref to canonical pairs in provider catalog |
whether coverage state justifies a dedicated table |
| provider_fx_rates |
6,420,823 |
885.5 MiB |
provider_id, base_currency, quote_currency, rate_date |
provider_id in provider |
provider-layer rate observations; coverage planning reads its PK endpoint seeks |
| fx_rates |
6,420,823 |
422.9 MiB |
base_currency, quote_currency, rate_date |
no enforced FK |
largest FX table; canonical provider-free series, pair/date PK access path and REAL rate storage |
| Table |
Rows |
Table size |
Primary key |
Main logical refs |
Initial review focus |
| schema_migrations |
1 |
4.0 KiB |
id |
none |
single-row by construction (migration 063: id INTEGER PRIMARY KEY CHECK (id = 1)); low review priority |