Repost - COUNT() w/ Clarification

  • Thread starter Thread starter MDW
  • Start date Start date
M

MDW

I'm trying to create a hit counter for my Web page. The
fast and dirty option is to have the Web page read in the
value of the current count, add one to it, then update the
database and display the updated result on the page.

The other option we're playing with is, for each page
visit, insert the date and time of the visit into the
database. Thus, we'd have one record in the DB for each
visit (we'd periodically flush the DB, of course, but we'd
probably build this records over a period of one to three
months, so we'd accumulate a decent number of records).
Thus, to find the hit count, we'd grab the COUNT() of that
field.

We're kind of interested in the date/time option because
it would allow us to compile reports about when the
traffic is highest, etc.

But, once the DB grows to 100,000 + rows, we're worried
that the amount of time it would take to fetch the value
from a COUNT() statement would be overly long.
 
Doesn't your domain offer all of this for free? (i.e.
http://www.impacthosting.com/stats/stats.htm)

How about using www.TheCounter.com?

Otherwise, you could perform a nightly update that subtotals the numbers, so
that you are not calculating 100k rows at runtime.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top