Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Redshift with Django

Redshift with Django

A simplified introduction to Redshift and how can Django fit in. Talk given at DJUGL June 2017.

Federico Marani

June 13, 2017
Tweet

More Decks by Federico Marani

Other Decks in Technology

Transcript

  1. Redshift with Django What it is and how to use

    it from our favourite web framework
  2. Redshift is an “OLAP” version of Postgresql Have to average

    1 billion values? In under 1 min? Mostly append to tables? No transactio ns or referential integrity? Yes Yes Yes Yes No No No No I don’t know
  3. Performance comparison Column-oriented Row-oriented Aggregate on a single column Fast

    Slow SELECT on many columns table Fast Slow INSERT/UPDATE on single rows Slow Fast SELECT single row Slow Fast
  4. Do not try this at home - Build a CRUD

    app on Redshift (low performance) - Use Django ORM on Redshift (common ops have low performance) - Use Django migrations on Redshift (types are slightly different) - Columns are NULLable by default - Optimize it (or change tables) like you would on Postgresql