>...
> if (upper('001234') == lower('001234'))
> SELECT * FROM table
> WHERE id = '001234';
> else
> SELECT * FROM table
> WHERE upper(id) = '001234';
>
>Even without the index I guess that would have saved it a lot of work.
I'm
I've just come across a case in Oracle 8.0.6 where important queries
could have been several orders of magnitude faster if only the optimizer
had realized that it was doing case-insensitive comparisons against a
constant that wasn't affected by case (a string of all digits).
The query was of the