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.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 What do I do with all this data?

Author  Topic 

X-Factor
Constraint Violating Yak Guru

392 Posts

Posted - 2008-03-09 : 18:48:56
Hi there,

I'm tracking views of online articles. In the db table, there's one row per article per day. So in other words, a record is being kept of how many hits each article gets per day. The website then shows a 'most read' list for the week and the current day.

After a few weeks I've already got 70000+ rows so I expect that after a year there'll be a million or more rows.

Is this going to be an excessive burden for the db? If so, is there anyway I can archive the info without losing any resolution to the reports that can be generated from the data?

Here's the table schema..


CREATE TABLE [dbo].[tbl_newsarticle_count](
[nID] [int] NOT NULL,
[Date] [datetime] NOT NULL,
[Count] [int] NOT NULL,
CONSTRAINT [PK_tbl_newsarticle_count] PRIMARY KEY CLUSTERED
(
[nID] ASC,
[Date] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
USE [newbury]
GO
ALTER TABLE [dbo].[tbl_newsarticle_count] WITH CHECK ADD CONSTRAINT [FK_tbl_newsarticle_count_tbl_newsarticle] FOREIGN KEY([nID])
REFERENCES [dbo].[tbl_newsarticle] ([nID])


Cheers, XF.

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2008-03-09 : 18:50:37
The only burden in size would be with hardware in terms of memory, and processing power the PC is capable of.

SQL can hand many,many,many millions of rows.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-09 : 23:48:50
X-Factor, don't worry about a few million rows. Once you get to say 500 million rows, then you'll need to worry about archiving or partitioning the data.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -