Posted by peter

Doing performance analyzes today I wanted to count how many hits come to the pages which get more than couple of visits per day. We had SQL logs in the database so It was pretty simple query:

SQL:
  1. SELECT sum(cnt) FROM (SELECT count(*) cnt FROM performance_log_080306 GROUP BY page HAVING cnt>2) pv;

Unfortunately this query ran for over half an hour badly overloaded server and I had to kill it in the end.
[read more...]