Insight for Developers

Speeding up GROUP BY if you want aproximate results

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:


select sum(cnt) from (select count(*) cnt from performance_log_080306 group by page having cnt>2) pv;


select sum(cnt) from (select […]

Read more