Re: Strange Index Usage: select ... where foo = 90 on a varchar

2004-04-15 Thread Max Campos
On Apr 13, 2004, at 2:01pm, Michael Stassen wrote: You shouldn't be surprised. This is normal behavior. interchangeStatus is a varchar, so select fileName from outDocInterchange where interchangeStatus = 91; requires that interchangeStatus be converted to an int for each row so it can be c

Strange Index Usage: select ... where foo = 90 on a varchar

2004-04-13 Thread Max Campos
Lucy, you've got some EXPLAINing to do... (sorry, couldn't resist) A) select fileName from outDocInterchange where interchangeStatus = 91; B) select fileName from outDocInterchange where interchangeStatus = '91'; (A) Runs unindexed, (B) runs with the istat_date index. Can anyone explain