79541115

Date: 2025-03-28 10:10:05
Score: 0.5
Natty:
Report link
After long digging into parameters and comparing explain (which were very different), I found out that "semijoin=on" in optimizer_switch was the issue. After turning  "semijoin=off" queries were executed in less than sec.
It seems that, in my case, the semijoin was pushing the IN clause at the beginning of the execution list before all other where/join.... comes after and pushing the large output results to a materialized temporary table which was slowing down.
So it's more my experience than a real question, as I didn't find the answer on internet, but I hope that semijoin did get smarter in newest Mariadb versions.
    
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Kador