{
  "id": "django-defer-only-table",
  "kind": "table",
  "slug": "django-defer-only",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/django-defer-only/",
  "title": "Defer or load only some Django fields, and when a covering index helps",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "defer()",
      "source": "Django docs",
      "detail": "Do not retrieve named fields from the database"
    },
    {
      "name": "only()",
      "source": "Django docs",
      "detail": "Opposite of defer(); listed fields are loaded immediately"
    },
    {
      "name": "primary key",
      "source": "Django docs",
      "detail": "You can never defer loading it"
    },
    {
      "name": "covering index",
      "source": "Django docs",
      "detail": "Index that holds search terms and output columns"
    }
  ],
  "related_slugs": [
    "django-querysets",
    "django-models",
    "sqlite-query-planner-indexes"
  ],
  "license": "CC-BY-4.0",
  "source_license": "BSD-3-Clause (Django docs); Public-Domain (SQLite); prose restates cited source lines in own words",
  "as_of": "2026-11-19",
  "status": "deep-draft-20261119",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}