~/talk

Making smarter queries with advanced ORM resources

Talkat DjangoCon Europe 2018 · 2018-05-23..05-25· [databases, django]
links:none on file
slides:none on file

Builds a toy Django project, imports hundreds of thousands of rows with bulk_create, and shows concrete ORM patterns that actually improve runtime. Uses Prefetch(queryset=...) to load only expenses for a given month/year and cut extra rows, uses filtered aggregates like Sum('value', filter=Q(month=..., year=...)) and compares that to filtered relations, finding the filtered-aggregate SQL runs about ten times faster in the example. Demonstrates subqueries with OuterRef('name') to match companies by partner name and state.

AI-written summary · about

  1. 0:00Introduction
  2. 2:00Why I came
  3. 8:10Whats the data
  4. 10:20Datasets
  5. 12:37Queries
  6. 19:24Aggregates
  7. 25:20Subqueries
~/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.