mysql query timeout after changing mysql server

15 views Asked by At

we have changed our cpanel and the mysql server has changer as well, in the old cpanel was 110.0 (build 24) and we had 10.3.39-MariaDB as mysql version, and the new cpanel is 118.0 (build 4) and we have 8.0.36 as mysql version.

in the old version we can run this request without any problem :

select (select count(statut) from evenement where statut='non fait' and idowner=usr.iduser and type='appel') as 'Non_Fait', 
       (select count(statut) from evenement where statut='fait' and idowner=usr.iduser and type='appel') as 'Fait',
       usr.nom as 'agent'
FROM evenement evt 
join users usr on evt.idowner=usr.iduser
join departments dpt on usr.iddept=dpt.id 
where usr.iduser not in (172) and usr.actif<>0 and usr.admin=0 and usr.direction=0 and usr.idagence<>92 and dpt.dept in ('commercial')
group by usr.nom
order by (select count(statut) from evenement where statut='non fait' and idowner=usr.iduser and type='appel') desc

in the new plateform this query get timeout, and its work only if we delete idowner=usr.iduser from the subqueries but the given result aren't correct.

thank you in advance for your help

0

There are 0 answers