You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do understand this scenario. I'm not going to say it's unimportant. I'm very well acquainted with it and in some cases have been able to get around it.
The problem as I see it is that it appears to be only come about through access via the django admin.
Perhaps if we removed the default ordering of -datetime people would be less likely to be initially hit by this.
So for instance, when you're doing a search on django admin, what are you likely to be looking for? Is it really just for items descending order by time, or more likely items in a certain object_type/object_id instead (and ordered by time)?
In the end we may have to allow this change (the devil's advocate was that I felt a bit cautious with regards to the incorrect index being chosen on certain queries, and thus scenarios where this would be slowdowns that you would not expect, given the additional index being in place).
In our scenario we have 1.7M records in the table (postgres DB)
By indexing the field CRUDEvent.datetime the following query performed in the admin goes from 38seconds down to <0.5sec
The text was updated successfully, but these errors were encountered: