Nav 2009sp1, sql2005
hi everyone, i think this is a very simple question, i think: i want to create a new key on 2 fields, that are both option type --> not selective.
There are no sumindexes on this index and i wanted to set the key like this:
Key: OptionField1,Optionfield2
SQLIndex: Primarykeyfield,OptionField1,OptionField2 (the default index would be OptionField1,OptionField2,Primarykeyfield)
Is this modification effective?or is it pointless?is it risky? (i know about some issues about sqlindex property)
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog0
Answers
An example:
T21:"Customer Ledger Entry" with 1.000.000 records
A filter on "Open" in is not useful if you want all the closed records (probably 990.000 records).
But if you want all "Open" records (about 10.000), the filter can be useful (but it is not guaranteed).
So if you think it might be useful, create it and see if SQL really uses it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So if you plan to filter on these fields and its a big table then you need the indexes irrespective of how selective they may be.
i also thought that nav (SQL) would have follow my instruction, but it didn't...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
RIS Plus, LLC
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
RIS Plus, LLC
I couldn't post this yesterday, (no connection) sorry...
My sql plan said Clustered index seek, not scan...i have to retry the test, maybe there was some filter on the primari key, too... :-k
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog