<p>I have been sick and tired Googling the solution for doing case-insensitive search on Sybase ASE (Sybase data/column names are case sensitive). The Sybase documentation proudly says that there is only one way to do such search which is using the Upper and Lower functions, but the adage goes, it has performance problems. And believe me they are right, if your table has huge data the performance is so awkward you are never gonna use Upper and Lower again. My question to fellow developers is:  how do you guys tackle this? </p>

<p>P.S. Don't advise to change the sort-order or move to any other Database please, in real world developers don't control the databases.</p>

[{'answer_id': 81327, 'author': 'Peter', 'author_id': 5189, 'author_profile': 'https://Stackoverflow.com/users/5189', 'pm_score': 1, 'selected': False, 'text': '<p>If you cannot change the sort-order on the database(best option), then the indexes on unknown case fields will not help.  There is a way to do this and keep performance if the number of fields is manageable.  You make an extra column MyFieldLower.  You use a trigger to keep the field filled with a lower case of MyField.  </p>\n\n<p>Then the query is:\n  WHERE MyFieldLower = LOWER(@MySearch)</p>\n\n<p>This will use indexing.</p>\n'}, {'answer_id': 3090940, 'author': 'Bipin Daga', 'author_id': 372873, 'author_profile': 'https://Stackoverflow.com/users/372873', 'pm_score': 3, 'selected': True, 'text': '<p>Try creating a <code>functional index</code>, like </p>\n\n<pre><code>Create Index INDX_MY_SEARCH on TABLE_NAME(LOWER(@MySearch)\n</code></pre>\n'}, {'answer_id': 8236651, 'author': 'kamsky', 'author_id': 1061007, 'author_profile': 'https://Stackoverflow.com/users/1061007', 'pm_score': 2, 'selected': False, 'text': '<p>Add additional upper or lower case column in your select statement. Example:</p>\n\n<pre><code>select col1, upper(col1) upp_col1 from table1 order by upp_col1\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/81268', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15395/']