Monday, March 19, 2012

Index on high update column

I have a column in my table that is being used in a select query. I would
like to index the column but it gets updated frequently. What is the best wa
y
to determine the cost benifit of indexing a column that is changed frequentl
y?Test it?
You can avoid some problems by specifying a lower FILLFACTOR when you create
the index -- I usually stay around 60 for most scenarios like what you
describe, but that's really just an arbitrary number I use -- and by
defragmenting it regularly.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Frank" <Frank@.discussions.microsoft.com> wrote in message
news:E860256A-CAC1-473C-80AC-E07919459765@.microsoft.com...
> I have a column in my table that is being used in a select query. I would
> like to index the column but it gets updated frequently. What is the best
way
> to determine the cost benifit of indexing a column that is changed
frequently?|||Frank
You could use profiler to capture the activity and then use the index tuning
wizard to see what recommendations you get. Do some testing as well, don't
always trust the wizard to get it right, but it is usually pretty good.
Regards
John
"Adam Machanic" wrote:

> Test it?
> You can avoid some problems by specifying a lower FILLFACTOR when you crea
te
> the index -- I usually stay around 60 for most scenarios like what you
> describe, but that's really just an arbitrary number I use -- and by
> defragmenting it regularly.
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
> "Frank" <Frank@.discussions.microsoft.com> wrote in message
> news:E860256A-CAC1-473C-80AC-E07919459765@.microsoft.com...
> way
> frequently?
>
>

No comments:

Post a Comment