Monday, March 26, 2012

how much index are reasonable on a table?

I have a table with about 25 colums. In my application, we have provided an
interface through which , search can be made on different column, either
alone or with combination of different columns.
Now there are about 10 columns , upon which search can be made, either
indicidually colum, or combined colums.
Now in order to have a fast search, I have to apply index on different
columns.
Is it ok to apply index on all the 10 columns that are used in search or
what else is the solution to have a quick search. I cant change Database
schema.Hi Malik
Changing the schema would be a better option. If you create too many indexes
it brings down the performance of the system.
Its not advisible to use too many indexes
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"SOHAIL MALIK" wrote:

> I have a table with about 25 colums. In my application, we have provided a
n
> interface through which , search can be made on different column, either
> alone or with combination of different columns.
> Now there are about 10 columns , upon which search can be made, either
> indicidually colum, or combined colums.
> Now in order to have a fast search, I have to apply index on different
> columns.
> Is it ok to apply index on all the 10 columns that are used in search or
> what else is the solution to have a quick search. I cant change Database
> schema.|||The OP sort of suggests changing the schema is not an option.
Indexes can affect performance negatively - that's true, yet in this
particular case they pretty much seem to be the only option.
Malik,
Consider using indexed views if appropriate, and/or full-text indexing (for
character-based columns) - both as an addition to existing indexes.
Of course another good option is to simply use the profiler and let the
index tuining wizard suggest appropriate indexes based on your workload.
ML|||Hi Malik,
As suggested indexed Views would be better choice. Create a unique clustered
index on the key numeric column. And add non clustered indexes on the other
columns.
Thanks,
Siva
"ML" wrote:

> The OP sort of suggests changing the schema is not an option.
> Indexes can affect performance negatively - that's true, yet in this
> particular case they pretty much seem to be the only option.
> Malik,
> Consider using indexed views if appropriate, and/or full-text indexing (fo
r
> character-based columns) - both as an addition to existing indexes.
> Of course another good option is to simply use the profiler and let the
> index tuining wizard suggest appropriate indexes based on your workload.
>
> ML

No comments:

Post a Comment