Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
irmorteza
Starting Member
8 Posts |
Posted - 2010-11-24 : 04:23:07
|
HiMy website is providing some services for other website. So I should know how much page view each site has. For that I am going to write some code in each website to get its hits counter.As you see may be time-consuming if other website has much views. And my question is how I should save this info?1.Do save hit counters in sql server and call sql for each hit2.Do save hit counters in text file and flush that to sql daily.(this may be source intensive)3.In 1 and 2 save data in access database.4.Or you have the better idea. |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-24 : 06:10:42
|
I would save the data to files - terminate the file every hour and start a new one.If you try to save to any sort of database then you might get issues with latency - either slowing down (or erroring) the web site access or missing hits. You would also have to maintain the database which could cause similar issues.Saving the data to files should be low impact and low risk. Then it's a matter of importing the hourly files and archiving. Gives you an automatic backup and should be quick. You can also query the imported data without affecting the web site.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|