couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <heshim...@gmail.com>
Subject Optimal counter implementation?
Date Tue, 10 May 2011 09:05:39 GMT
Hi,

I'm working on this project, that needs to count page views. I came up
with two possible solutions:

1. For each page to be counted, use a single count document, and an
update handler to count on each page view
2. Create a new document on each page view, this way I get to record a
history of views, which I prefer

I was wondering if the second method will consume too much space and
CPU on a heavy traffic website. If I need the log of page views, it
looks like this is the only way. But is it the correct and optimal way
of doing counters?

Or should I pick an alternative database for counters?

-- 
Best regards,
He Shiming

Mime
View raw message