- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
perf(sharing): Use oc_share.item_type IN instead of OR equals #51669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perf would be the right conventional commit type ;)
…equals to improve performance by using the db index Signed-off-by: Marcel Klehr <mklehr@gmx.net>
eb72f1d    to
    b464469      
    Compare
  
    | Do we backport this? | 
| I'd say no, as nobody has been complaining about these exact queries causing performance problems. | 
| I have a ticket from a customer where these are problematic among others. They are on 29 | 
| /backport to stable31 | 
| /backport to stable30 | 
to improve performance by using the db index
Summary
We found a query like this that doesn't use the available index and seems to cause a table scan, which seems to be due to the use of OR instead of IN.
Thanks to @Altahrim for figuring this out.
Checklist