On Aug 21, 2009, at 2:33 PM, Shaun Seckman (Firaxis) 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.  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.

The entire key will be read into memory regardless.  The extra time  
spent in memcmp() bypassing a common prefix is likely to be  
unmeasurable.

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to