I saw a funny one today. I’ll paraphrase:
select * from table_x where upper(acct_number) = '876876' or upper(acct_number) = '826531'; |
Nice huh?
1. Obviously turns off any indexes on acct_number (unless they had a function based index).
2. Looks like they are probably storing numeric data in a character data type (or implicitly converting a number to character string).
3. Not using bind variables so they are not helping themselves from a parsing standpoint.
4. Finally, they’re making darn sure they take care of any mixed case numbers!
Some fun.
(by the way, those lower case numbers cause me problems all the time)
Full name
Kerry Osborne
My company
http://www.enkitec.com
Recent comments
21 weeks 22 hours ago
30 weeks 6 days ago
32 weeks 4 days ago
35 weeks 5 days ago
38 weeks 11 hours ago
47 weeks 4 days ago
49 weeks 1 day ago
50 weeks 1 day ago
50 weeks 2 days ago
1 year 6 days ago