Implementing page hits
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.
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.