~/talk

Building effective Django queries with expressions

Talkat DjangoCon US 2019 · 2019-09-22..09-27· [databases, python]
slides:none on file

Claims that query expressions scale: on a 500,000‑row example raw approaches take ~4s while expression‑based queries run ~0.32s, and the project has tables with more than ten million records. Shows concrete tools used: Q objects, F expressions, Case/When and ExpressionWrapper, plus database functions like Concat, Coalesce and Extract. Demonstrates annotations (add 56 days, compute missing bags, annotate full_name on a manager) that remove denormalized fields and fix stale data — the changes work and improve performance.

AI-written summary · about

  1. 0:00Introduction
  2. 0:49Vanessas background
  3. 1:25Vita Software
  4. 1:47Open Source
  5. 2:02Call a question
  6. 2:23Django 14 years old
  7. 3:09Normalization
  8. 4:43Pure Expressions
  9. 5:43Query Objects
  10. 6:35Complex Filters
  11. 7:16Tip
  12. 7:45Search
  13. 9:09Query without query
  14. 9:29SQL parse
  15. 9:59F expressions
  16. 11:09F objects
  17. 13:28Expression wiper
  18. 13:53Unique queries
  19. 14:18Summary
  20. 14:30Database Functions
  21. 16:08Concatenation
  22. 17:12Annotation
  23. 17:50Colley
  24. 18:27KnowIf
  25. 18:56NoLeaf
  26. 19:09Conditional logic
  27. 19:39Discount logic
  28. 21:17Database functions cast
  29. 21:50Conditional expressions
  30. 22:20References
~/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.