Procure em C:\ProgramData\MySQL\MySQL Server 8.0 o arquivo my.ini e habilite a seguinte linha:
slow-query-log=”ON”
e detina o tempo da slow query:
long_query_time=0.5;
E defina o arquivo:
slow_query_log_file=”c:\\teste.log”
Utilize um tail neste arquivo para ver as alterações em tempo real, o -Wait faz um efeito igual ao tail do linux:
Get-Content C:\temp\slowQuery.txt -Wait
Você tambem pode definir por:
Por algum motivo tem q ficar setando o arquivo tb senao ele buga