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
 Other SQL Server Topics (2005)
 Freeze an index while updating

Author  Topic 

joconcours
Starting Member

1 Post

Posted - 2007-09-20 : 05:52:49
Her is what I'd like to do:

- Create and populate a table
- Index it on a 'reference' field
- Then update the table by using the index but WITHOUT updating the index (I'd like to have it available for the WHERE clause but I don't need to updtae it)
- Eventually, i'd like to re-index the whole table

Is that possible?

Thank you for your help...

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-09-20 : 12:33:38
This is not possible. You can't "freeze" the index for the UPDATE portion and not for the WHERE clause.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-20 : 19:55:05
I'm missing something here:

if you were able to prevent the Index being changed during the Update how would the index be any use for a subsequent Where - because the index would now be inaccurate?

Kristen
Go to Top of Page
   

- Advertisement -