Opened 9 years ago
Last modified 3 weeks ago
#27833 new Bug
prefetch_related fails with SQLite when used with 1000 parent records — at Version 1
| Reported by: | Jason Barnabe | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.10 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
This is described in ticket:16937#comment:3, but I don't see any issue filed for it.
"[prefetch_related] will not work on some backends if you have a lot of objects in your queryset. For example the SQLite backend has a limitation of 999 parameters to single SQL query, so if you have 1000 objects, prefetch_related will fail as you need to supply 1000 id values to the query."'
Batch it up like in #16426 and #17788, which dealt with the same limitation?
Change History (1)
comment:1 by , 9 years ago
| Description: | modified (diff) |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.