Re: Optimizer behavior - DOH!
Posted in 1996
Bob Payne wrote: > > Does the optimizer use partial indexes? In other words, if I have an > index on the sku column, warehouse column and the date column, do I have to > include all three of those in my where-clause? > > In former times I've selected using only one of the three and the Optimizer > will use the index. Now, sometimes it does and sometimes I have to include > all three in order to use the index. Sometimes the order matters and other > times order of the columns makes no difference at all! Dopey! > > Does anybody have a clue as to how the optimizer makes its choices? > > -- > Bob Payne Software Development Manager > PC Service Source email: bpayne@netcom.com > 2350 Valley View > Dallas, TX 75234 > (214) 481-4707 WWW: http://www.pcss.net/~bpayneMy understanding was that it could use an index if that column was defined as the first field in the composite index. If the column was the second or later field, then it couldn't be used as an index and would have to be defined as one.