Unfortunately, not all the prefixes are the same or even the same width, they just all share very similar prefixes.
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of P Kishor Sent: Friday, August 21, 2009 2:37 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Reverse string comparison for searches On Fri, Aug 21, 2009 at 1:33 PM, Shaun Seckman (Firaxis)<shaun.seck...@firaxis.com> wrote: > Hello everyone, > > 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. Has anyone done this? Is it practical or worth doing? These > lookups are performed very frequently so any amount of time that can be > shaved off will be noticed. If the prefix is just 'TXT_KEY_', you could split the strings into two columns, or heck, only one column with just the unique part, index that, and be happy. > > > > -Shaun > > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, WI, United States _______________________________________________ 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