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 |
arpitak
Starting Member
1 Post |
Posted - 2012-01-04 : 06:25:59
|
Hi,I am using sql server and one of the table in Database is having huge amount of data.It is around 60 lakhs of data.All the records are getting stored with its current time-stamp and we have to run a query , which will return all the rows based on the latest time-stamp. So, I wanted to use index to improve the performance of this search operation.So, I want to make the index on the time-stamp column. But the time-stamp column could have duplicate data and the result should return multiple rows for a particular time-stamp index.so, here are my questions. - Can I create index on a column which holds duplicate data? (The value of the index of that column should be distinct)
- Can one index key could hold multiple rows?
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-04 : 12:23:56
|
both question have yes as answer. but problem with creating an index on column with too many duplicates would be that index might not get used by optimiser if it feels that overhead is high------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|