diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-02-28 19:42:29 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-02-28 19:42:29 +0000 |
| commit | a81a6e9abef2302a6bfc3d2bf0c47013bfc87bb3 (patch) | |
| tree | 93ad990b3145f8d8d719aa8eceea8d7832a1a381 /docs | |
| parent | 37c66a0999b45c30e847012ae2e707663dd8cd66 (diff) | |
Added note to docs/db-api.txt about 'depth' being new in Django development version
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/db-api.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt index 5cb5e4c983..20a319740e 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -596,7 +596,7 @@ related ``Person`` *and* the related ``City``:: Note that ``select_related()`` does not follow foreign keys that have ``null=True``. -Usually, using ``select_related()`` can vastly improve performance since your +Usually, using ``select_related()`` can vastly improve performance because your app can avoid many database calls. However, in situations with deeply nested sets of relationships ``select_related()`` can sometimes end up following "too many" relations, and can generate queries so large that they end up being slow. @@ -608,6 +608,8 @@ follow:: b = Book.objects.select_related(depth=1).get(id=4) p = b.author # Doesn't hit the database. c = p.hometown # Requires a database call. + +The ``depth`` argument is new in the Django development version. ``extra(select=None, where=None, params=None, tables=None)`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
