Opened 18 years ago
Closed 18 years ago
#2565 closed enhancement (fixed)
Documentation should clarify lazy nature of querysets
Reported by: | Simon Willison | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've answered a couple of comments in the documentation recently about QuerySet lazy evaluation:
http://www.djangoproject.com/documentation/tutorial4/#c2024
http://www.djangoproject.com/documentation/models/pagination/#c2032
That's enough for me to think that this is a frequent misunderstanding. We certainly don't want people to be put off Django because they think it makes horribly inefficient queries, when the exact opposite is true!
An entry in the FAQ would be a good start, but having notes (and a link) about this behaviour in the relevant places in the docs would be smart too.
Attachments (1)
Change History (5)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
Where should this be mentioned? possibly the best place would be to have a chained filter example in tutorial 1 and a comment/link to the db-api doc.
comment:3 by , 18 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
So a link from various places to this: http://www.djangoproject.com/documentation/db_api/#querysets-are-lazy might solve it?