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 |
|
sql777
Constraint Violating Yak Guru
314 Posts |
Posted - 2005-06-08 : 22:19:59
|
| Hi,I have a table with a Identity PK (1,1). Most of my lookups are using a string PageName VARCHAR(255).What sort of index should I put on this field? (it is a unique value also) |
|
|
sql777
Constraint Violating Yak Guru
314 Posts |
Posted - 2005-06-08 : 22:24:51
|
| Ok I just put a index on it (non-clustered).within seconds the operations went from taking 2 minutes to literally 2-3 seconds! |
 |
|
|
nathans
Aged Yak Warrior
938 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-06-09 : 18:39:21
|
| My vote would be to add a clustered index on PageName, so the PK would be non-clustered. But we'd need to some queries to decide for sure.Tara |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-06-09 : 19:32:29
|
| What is your query to search this column? Are you searching for a single row, or many rows?Is this being used for lookups for a Web application or for reports?That's a very big index if your data is really 255 characters wide. How many rows do you have and expect to have in this table?If this column is your primary lookup on this table, Tara's suggestion of making the index on this column clustered would be a good way to go, and would save a lot of apace.What is the DLL and Query for this table?CODO ERGO SUM |
 |
|
|
|
|
|