User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,102 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,510 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 314 | Replies: 4
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Storing Views and File information

  #1  
Mar 17th, 2008
I was wondering, I am doing my best to eliminate a lot of Database queries that are unneeded in order to increase performance. However, this is a tough task as each solution has its own drawback which I then have to compare to see which ones would be better performers, under which circumstances.

Without getting this too complex, I will let you know what I am asking.

I was wondering which would be more costly in terms of CPU usage, resources taken, etc. All in efforts to increase the amount of requests the server can take at a time, and to decrease the amount of time it takes to process each request.

Currently I am logging each view into a database. This means that if I have 20,000 views in that day over so many different files, that's 20,000 queries to the database to change the amount of "views". This I am reconstructing.

What I am planning on doing is putting the views in an xml file along with all information regarding that file. Along with this, views need to be updated in the database as well, lets say every 2 - 4 hours, depending on the time and load of the server at the time.

I will be logging each view on each category on each file. This means that I have roughly 82,000 files that are being viewed. I need to log the amount of views that each file takes within a 2-4 hour period. Every 2-4 hours, the file is put into an archive, and a new one is created with a value of zero.

So here are the options, and please let me know what you think of each:
1. I can update the xml file, along with a txt file that just includes the amount of views. At the interval times, the txt file can be read, and the value can be inserted into the corresponding record in the database. The bonus of this option is that the xml file will be read and bound to the page. After this has happened, a request will be made with certain information to a page that will update the xml file and the txt file behind the scenes. This means only one file is used to read from for each user.

2. I can have the database tapped for views, which will update the views at the same time. This means less server load, but is are pointless database taps.

3. I can store all views in a certain xml file, read through, retrieve the value, display it, update the file with the new views. The problem I see with this one is that every user then uses two files for some information. However, I can quickly upload the entire file to the database for quick updating. (This might be better as it will take less time on the database server than the others).
Thank you for any help. You can offer other suggestions as well. I gotta run, so I am cutting this short. Thanks again!
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:05 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC