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
 SQL Server Administration (2005)
 Server down

Author  Topic 

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2009-09-25 : 12:34:51
During peak hours , I created indexes on few tables. Next thing that I hear is that the users of different application cannot log into the server. My question is,creating indexes on tables of put tremendous load on the server?

Answers will be appreciated.

Thanks,
Sunny

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-25 : 16:44:09
Yes it can. If you are using Enterprise Edition, then make sure you specify the ONLINE option. And if your tempdb is optimized (one data file per CPU), then you should also use the SORT_IN_TEMPB option. Using both of these options drastically reduces the impact to the users while the indexes are being created.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2009-09-25 : 17:08:21
Could you please tell me where do i mention ONLINE and SORT_IN_TEMPDB in an index creation script.

Thanks,
Sunil

quote:
Originally posted by tkizer

Yes it can. If you are using Enterprise Edition, then make sure you specify the ONLINE option. And if your tempdb is optimized (one data file per CPU), then you should also use the SORT_IN_TEMPB option. Using both of these options drastically reduces the impact to the users while the indexes are being created.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-26 : 15:40:32
Here's an example:

CREATE NONCLUSTERED INDEX idx_SomeColumn1_SomeColumn2
ON SomeTable(SomeColumn1, SomeColumn2)
WITH (ONLINE=ON, SORT_IN_TEMPB=ON)


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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2009-09-28 : 10:28:37
Great!! I'm sure this would help me a lot. Thanks so much.

Thanks,
SUnny.
quote:
Originally posted by tkizer

Here's an example:

CREATE NONCLUSTERED INDEX idx_SomeColumn1_SomeColumn2
ON SomeTable(SomeColumn1, SomeColumn2)
WITH (ONLINE=ON, SORT_IN_TEMPB=ON)


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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-28 : 13:03:40
You're welcome.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -