~/talk

Reporting on Rails - ActiveRecord and ROLAP Working Together

Talkat RailsConf 2017 · 2017-04-25..04-27· [databases, ruby-on-rails]
slides:none on file

ActiveRecord and ROLAP are shown working together: a lightweight active_reporting gem builds SQL metrics, returns arrays of hashes instead of AR objects, and hits Postgres with GROUP BY restrictions and date handling via a date dimension. Practical results include de‑normalizing dimensions, avoiding has_many aggregates, using counter caches or read replicas, and tuning with EXPLAIN ANALYZE. Version 0.1.1 exists and is used in production at scale with million+ device billing data.

AI-written summary · about

  1. 0:00Intro
  2. 1:13The Scenario
  3. 2:01Couple notes...
  4. 2:46What is reporting ?
  5. 3:16What do you want to answer?
  6. 4:07What is "ROLAP"
  7. 6:04OLAP Terminology
  8. 6:32Fact Table/Model
  9. 8:17Dimension Hierarchy
  10. 9:09Dimension Members (Dimension Labels)
  11. 9:52Dimension Filters (or just "Filters")
  12. 10:35Measure
  13. 13:03Star Schema
  14. 15:54Dates as Dimensions
  15. 17:29Great! ActiveRecord can do all that.... right?
  16. 19:44Options?
  17. 22:54active_reporting - Dimensions
  18. 24:30active_reporting - Dimension Filters
  19. 26:11active_reporting - Metric
  20. 26:59active_reporting - Report
  21. 29:51Other Database Considerations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.