Making Data Dance
summary
Rails apps push heavy queries into PostgreSQL using lead/lag window functions to mark message groups and indoor location transitions, then fold those results into D3 chord, heatmap and sunburst visuals; views and materialized views store reusable reports, with a rake job to pull production data for realistic benchmarking and a firm rule that queries over 500 ms are wrong. Postgres features used include PostGIS, arrays and range types, UUIDs, and JSONB, and Postgres 9.4 enables concurrent refresh of materialized views so periodic precomputation works in production.
AI-written summary · about
chapters (9)
- 0:00Start
- 7:46Window Functions
- 11:18Practical Example Chat App
- 15:34Base Query
- 17:25Refactor
- 21:07My query is too slow
- 21:20Materialized View Stored Query And Data
- 29:34Recap
- 30:14Not saying do everything in the database
related talks
33mMaking Data Dance
46mUse PostgreSQL, not Rails, to make Rails Faster!
31mUsing Databases to pull your applications weight
43mJust Use Postgres.
28mUsing a database in a data science project - Lessons learned in production
23mSupercharging ActiveRecord with PostreSQL
26mBiggish Data With Rails and Postgresql
34mAnalytics and AI with PostgreSQL - Mission Possible!
