Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Indexing
If I need to add indexes to a large number of  SQL Server 2005
tables/databases tables, can I do it during the day when the database is in
use?  Or is this something that I should do after hours?  Adding and
dropping indexes seems pretty benign (assuming you pick the right fields),
but I'm new at this, if you can't tell.  Thanks!



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Huddle
04-04-06 06:23 PM


Re: Indexing
You can add indexes using the ONLINE option (some restrictions, see Books On
line, the updated
version, CREATE INDEX). ONLINE mean that SQL Server will not acquire a lock 
on the data while the
index is added. ONLINE is only available on Enterprise Edition.

If you don't use ONLINE, the table will be locked by shared lock if you crea
te non-clustered index,
or exclusive lock if you create clustered index. This will obviously have an
 impact of those who try
to access the tables while the index is being created.

Apart from the locking and blocking situation, the will be an obvious resour
ce usage while the index
is being created.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/


"Chris Huddle" < chuddle@NOSPAMtimepl
us.com> wrote in message
news:OMlTwkAWGHA.5148@TK2MSFTNGP12.phx.gbl...
> If I need to add indexes to a large number of  SQL Server 2005 tables/data
bases tables, can I do
> it during the day when the database is in use?  Or is this something that 
I should do after hours?
> Adding and dropping indexes seems pretty benign (assuming you pick the rig
ht fields), but I'm new
> at this, if you can't tell.  Thanks!
>


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
04-04-06 06:23 PM


Re: Indexing
ummm, adding indexes during the day pretty much locks out the users
from accessing that table while the indexes are being made.

if the users don't mind, then neither do I  !!!!!!!!!!


Report this thread to moderator Post Follow-up to this message
Old Post
Doug
04-07-06 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:01 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006