Our PHP log shows a lot of slow requests, which are direct queries on manticore via mysqli_query().
This function call takes 5+ seconds.
There is nothing in the manticore logs. Is there any way to debug to know what could be the bottleneck here?
Our PHP log shows a lot of slow requests, which are direct queries on manticore via mysqli_query().
This function call takes 5+ seconds.
There is nothing in the manticore logs. Is there any way to debug to know what could be the bottleneck here?
These documentation sections may be helpful:
Other than that what helps a lot usually is:
vmstat
/dstat
for that while running the slow query in a loop.The big problem is that I dont know which queries are slow, we have milions running.
How can I log a slow query, is there an option in Manticore (like the slow_query_log in mysql?)
While there isnt a dedicated ‘slow’ log, the normal query log can be used
https://manual.manticoresearch.com/Server_settings/Searchd#query_log
The total time for the query is logged.
Can filter that manually (with awk or similar) to just get slow queries.
Or can in fact specify a minimum time
https://manual.manticoresearch.com/Server_settings/Searchd#query_log_min_msec
so that only slower queries are logged.
thx, exactly what I needed!