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
 Choosing the right Table indexes

Author  Topic 

irs2k3
Starting Member

22 Posts

Posted - 2010-06-08 : 00:57:11
Hi guys,

I have the following table :

SELECT [ID]
,[CategoryID]
,[Title]
,[Description]
,[AuthorNewsURL]
,[NewsImageURL]
,[NewsDate]
,[ImageSize]
,[CultureID]
,[Clicks]
,[Trims]
,[Comments]
,[CategoryName]
,[MapPath]
,[SiteName]
,[SiteURL]
,[CategoryFeedID]
,[NewsTime]
,[FeedTypeID]

Most of the queries get data from this table with the following filters :

Where CategoryID = 2 AND NewsDate = 'Specific date' AND FeedTypeID = 1

Or

Where CategoryID = 2 AND NewsDate Between 'date1' 'date2' AND FeedTypeID = 1

This table will grow in size to reach almost 3 millions record each month.

What is the best choice for indexes for this table.

Thanks.

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2010-06-08 : 01:13:44
This should be a good read for your answers.

http://msdn.microsoft.com/en-us/library/aa933131(SQL.80).aspx
http://msdn.microsoft.com/en-us/library/aa933130(SQL.80).aspx
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-06-08 : 03:02:28
Index on NewsDate with include fields for CategoryID and FeedTypeID
Go to Top of Page
   

- Advertisement -