4 ms·
You store simple counts, and whenever a particular type of query is made you increment the relevant count(s). You can count all the red cars that pass by witho
by nightcracker 12y ago
You store simple counts, and whenever a particular type of query is made you increment the relevant count(s).
You can count all the red cars that pass by without logging their license plates, model type and number of passengers.
- iancarroll 12y agoOk - was curious because they're counting cache hits ('which cars have a passenger') and a few others.
- mootothemax 12y agoYou store simple counts, and whenever a particular type of query is made you increment the relevant count(s). Exactly. As a plus, precise accuracy isn't necessary here, no-one's going to care if you report 39,893 instead of 19,898 queries per minute. Simple counters + regular reset to zero would do the job well enough.
- Amfy 12y agoExactly that way it is done.