I’m working on a little web project that needs to keeps to a NumViews counter for each object/row in a DB table. I’m concerning that all the updates to rows would start really degrade performance both the table grows in object count, and the site would grow in use.
I’m using .NET 3.5 with MSSQL 2K5 if it matters.
Any suggestions?
Thanks in advance!
–joel
Our current guestimations on DB usage come to a sustained ~66 reads a second.
I like the idea of splitting the counters into a separate table. Do you know of any articles or white pages supporting it, or is it one of things everyone just does? 😛
Also, while updating, does the DB lock the entire table or just that particular row? I would assume just a row, but wasn’t sure.
Thanks,
–j
I’d suggest:
Putting the row -> count data in another table (with fixed size columns) so that you’re not continually writing to your main table just to maintain counts
Abstracting access to that so that as the application grows you can replace the DB table with some more efficient structure