Well no not really because this file gets cached by the OS, but it would
have to be cflocked and this would create a performance loss!


-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 23 January 2002 1:31 AM
To: CF-Talk
Subject: RE: Hits counter at DB? (II)

Oh, one more thing, about the text file hit counter.

If your using a text file, your server would have to access that file on
the hard drive each time it was written to.

That would cause serious performance loss.

The fastest way would be through the database, adding a hit_counter
field to your rows would be less of an impact on the database size then
if you added an entire new table that tracked each business card by
hits.

______________________
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-----Original Message-----
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 22, 2002 8:48 AM
To: CF-Talk
Subject: RE: Hits counter at DB? (II)


Okay, going on that there are a couple of questions to ask in return.
What kind of data source is this running on?  Is it running on a
dedicated machine or on something that is sharing resources?  As far as
the "business cards", where do they come from?  Are they stored in the
database or are they static pages that are being called?

Counters can be done any number of ways.  The easiest would be to do an
update or a locked update statement.  Another way would be to create a
table that was a "counter" table that you inserted into versus updating.
The "report" would then be along the lines of "select count(page_id) as
hit_count from counter where page_id = whatever" instead of "select
hit_count from counter".  Another idea, a hybrid of the two I just
mentioned, would be to have a temp table that a hit would insert into
and then a second table that head totals that were calculated nightly by
a scheduled process.

Hope these give you some food for thought.

Hatton

> > Our website is composed by a huge number of "business cards". We 
> > want to show to our clients their "card" statistics with pretty 
> > interface.
> Something
> > like: hits by day, hits in the last month, average, etc. The first 
> > thing
> we
> > thought was to make an "UPDATE Counter = Counter + 1" query
> each time the
> > webuser hits each webpage. But We are thinking this can be
> dangerous cause
> > we have more than 1000 000 hits in a month and growing.
> >
> > We can't give access to a statistics software.
> >
> > May we use and text file instead? What do you recommend?
> >
> > Thanks in advance,


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to