PDHdata / SmallFormats

Deck-stats server for less-common Magic: the Gathering formats
MIT License
6 stars 0 forks source link

Theme pages take a long time to compute #55

Closed vtbassmatt closed 1 year ago

vtbassmatt commented 1 year ago

Along with Top Cards, the Theme pages take a long time to compute. (I expect Synergy — #45 — will also be compute-heavy on the database.) It would be nice to replace this with a pattern that either:

  1. Caches the database result (not the whole page)
  2. Pre-computes results, perhaps in the daily fetch
  3. ... something else?
vtbassmatt commented 1 year ago

Materialized views are an option since we're on Postgres. But it might be more explicit (and portable) to introduce a new, full model which is computed daily.

vtbassmatt commented 1 year ago

Synergy ended up with its own dedicated model.

vtbassmatt commented 1 year ago

Fixed.