sql - Non-Clustered Index on all the columns -


if allowed create 249 non-clustered indexes on table mean safe have non-clustered on every column? effect of that? or have choose columns create non-clustered index.

is this:

create nonclustered index ix_test(col1, col2, col3) 

different this: ?

create nonclustered index ix_test(col1) create nonclustered index ix_test2(col2) create nonclustered index ix_test3(col3) 

indexes reads , bad writes.

when reading data indexes can find data quicker , make reads quick.

on other hand

when writing data (update/delete/insert) sql server have write data twice once on sql server pages actual data stored , once indexes. result in slower writes.

you have find middle ground reads not suffer not enough helping indexes , writes not suffer many indexes.

the above statement true oltp applications, data changing quite if olap/data warehouse data hardly changes if ever, can add many indexes reads require perform better. hope helps.


Comments

Popular posts from this blog

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -