Re: [HACKERS] Case sensitive searches

2002-06-27 Thread Mario Weilguni
>... > 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

[HACKERS] Case sensitive searches

2002-06-27 Thread Jeroen T. Vermeulen
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