django-reversion: Version.object_id lookups too slow
In cases where the pk
field of a given model is not an int, the object_id_int
is not being used. If a lot of rows exists for this model, it makes the lookups very very slow.
These look ups can be made considerably faster by adding a db_index=True
attribute to the text field.
It seems South
does allow creating a schemamigration for this and it runs with sqlite and postgresql. Also, Django adds a type specific index (if db supports it).
Is there any reason why this can’t be added?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (7 by maintainers)
Closed by 54288b055ad8a8dca75e18482f9d90e88805281b