This is great! Exactly what I was looking for. Do you by any chance know the function name of the standard collation used for string comparisons? I'd like to use that as a foundation for building a new one.
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Friday, August 21, 2009 2:44 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Reverse string comparison for searches Shaun Seckman (Firaxis) <shaun.seck...@firaxis.com> wrote: > Currently, in my database I'm storing thousands of > strings that are formatted in such a way where they share similar > prefixes (i.e. TXT_KEY_FOO, TXT_KEY_BAR). Sadly, this format cannot > be changed so I was wondering if it would be possible and perhaps > faster to have SQLite perform reverse string comparisons for looking > up specific strings. You can write a custom collation that compares the strings the way you want, then build an index and perform searches based on that collation. See http://sqlite.org/c3ref/create_collation.html Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users