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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-03-03 : 10:06:03
|
| Slayer writes "Probably a really lame question but in the absence of our DBA I have been asked to create a couple of indexes on a table. No problem with that, just need to know if this is a safe operation whilst users are using the database.Thanks for your help" |
|
|
druer
Constraint Violating Yak Guru
314 Posts |
Posted - 2006-03-03 : 13:50:23
|
| In terms of safety, nothing "bad" will happen from creating the indexes while others are using the system.In terms of PERFORMANCE, it depends on how big the table(s) are that you are adding an index to, and how busy the system is during that time. We have a pretty nicely configured system and I'm able to add indexes during the day without impacting performance (to where anyone notices anyway) if the tables are less than 1,000,000 rows of data. Anything over that and people end up noticing. The DANGEROUS part of it is going to be in knowing whether the indexes should be created or not. The DBA might know that what some developer is asking you to do shouldn't be done. But you know the politics of your environment better than me. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-03-04 : 01:26:42
|
| I think its possible that Stored Procedures won't use the new index for their (cached) queries until they are recompiled (and possibly until statistics are recalculated). If you have a low usage server then stop/starting SQL Server after creating the index will sort that out - but its a bit of a "blunt" approach!If the index makes things worse (which seems unlikely) you can always drop it (and cycle SQL Server again if you need to)Kristen |
 |
|
|
|
|
|