Open nickvergessen opened 2 years ago
cc @ChristophWurst @CarlSchwan @skjnldsv
how many rows does the table oc_user_status have and are you really see performance problems? i believe mysql do full table scan because it is more efficent in that case and that would not be a bad thing at all.
how many rows does the table oc_user_status have and are you really see performance problems?
As per Explain there are around 227 entries. so it seems it's around the 10% mark where they stop using it. We are not really observing slowness directly, we just enabled the slow query log with "queries that don't use an index" and those are getting reported.
At 10% it seems reasonable that doing a full table scan will be faster than walking the index multiple times.
Getting user status for many users (e.g. the talk room list is loading the status of all one-to-one conversations)
If the count is below 21 the index is used:
Similar issue with getting calendars
again fixed when using a smaller IN: