I have a table, hraces, with a column called "horse" and an index
"lower(horse)".
If I try:
explain select horse from hraces where lower(horse) = 'little irish nut';
The query doesn't use the index. It says it would do a sequential scan.
I have another table, tmp, which also has a horse column.
If I do:
explain select hr.horse from hraces hr, tmp where lower(hr.horse) =
lower(tmp.horse);
The explain says it would do a sequential in tmp and use the index on
hraces. This makes perfect sense since hraces has close to 8 million records
and tmp has less than 300 records.
What I can't understand is why doing the select against hraces alone
doesn't use the index. If I do the select without the 'explain' it does
find the 84 records on hraces for 'little irish nut'.