On Mariadb 10.0 on Linux Centos 6, I have a query that takes forever, even if launched with ”explain”.
The process is shown to be in the ”statistics” phase, it goes to 100% cpu, but the (physycal) host is idle overall (also no i/o).
This query is 150 line long (I dont know much sql) and was given to me by a dev who’s trying to optimize. There is a previous version of it that works normally in 3 seconds (if qcache is off). It’s just a small erp database, lots of tables but nothing big or enterprisey.
The same query works flawlessly on dev pc [devs have mariadb 10.0 for windows.] We already tried restoring the db, going on other servers, restarting mysqld or removing all server specific settings…
Any idea what it could be??