I have a server and many websites, i want to see the most common queries so that to optimize them.
Do you know any tool or any way to collect some statistics ? Thank you
I have a server and many websites, i want to see the most common queries so that to optimize them.
Do you know any tool or any way to collect some statistics ? Thank you
Since in your last question you seemed to be uninterested in solutions that you don't already have installed, here's a solution that uses only common POSIX commands:
grep 'Query' general-query.log |
sed -e 's/.* Query //' |
sort | uniq -c | sort -n
Depending on the size of your MySQL general query log, this might take a while to run.