|
-
By predicate field I mean a field included in the where clause predicate ( these fields here as you mentioned are NGPROJGUID NGUSRFLD2 and NGUSRFLD19.
Their order in the where clause should not matter, but the order in the index does.
As you explained, each of your indexes has a leading column of NGPROJGUID, and hence it can be used for the predicate NGPROJGUID='.......' and in addition for the predicates on the other fields in the index. Normally CBO should choose the most selective index and it should choose right, when stats are present.
In this setup I really do not have an explanation why CBO stopped using NGUSRFLD2_IND in favor of NGUSRFLD19_IND
Histograms could really help, but that's not sure. If you have highly skewed data, then histograms are useful. However I would not go with guessing here. Try to find out where the problem is and then solve it.
BTW what is the view definition? maybe the view contains some additional predicate or something which we cannot see
Last edited by Bore; 11-21-2006 at 12:21 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|