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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Question on performance

Author  Topic 

John Sourcer
Yak Posting Veteran

91 Posts

Posted - 2008-12-07 : 15:24:01
If I have a table with say 20 columns, mostly nvarchar(n). The first column is a unique id column set as the primary key. The 5th column is say product name nvarchar(240). The table contains 1 million rows and growing. The product name can be repeated but the id remains unique.

Anyone know how much slower finding a product by product name will be as opposed to getting it by it's id?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-07 : 16:37:08
We can't quantify that for you. You'll need to test it. But a properly indexed table should be very fast with only 1 million rows. 1 million rows is a small table these days.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -