SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Implementing page hits

    Hi All,

    I am trying to implement page hits in my website. All the hit records I am storing in a database which is in a seperate server. In a minute around hundreds of page hits expected in my site. I am little worried due to this huge page hits. Do I need to use mysql_pcooect for storing records in the other server? Any other thing can I do in order to do some performance tuning? Please advise.

    Regards,
    Nilanjan

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    First, don't assume you have a problem and overoptimize for this problem before you actually have one.

    Recording hits to a database is not that uncommon and not that stressful an operation. It's just one insert or update (depending on your design) per hit, on one table.

    Make the table as narrow as necessary (fewest columns needed) and have as few indexes as necessary, as indexes have to be updated with each inserted or updated row.

    You don't want to use mysql_pconnect or do anything else special.

    I run a web stats service that records every hit to over 30,000 websites in realtime. It records several hundred per second per server, and these are cheap commodity servers the database runs on, no 16GB 8 core custom built things or anything like that.

  3. #3
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dan


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •