On 1 Dec 2013, at 4:51am, Tristan Van Berkom <trista...@openismus.com> wrote:

> Do you have a suggestion which does not make an assumption about what
> is the highest value of a character ?

No.  The trick is common in many computer languages and I've never seen a good 
formulaic way of doing that.  You generally see that the programmer has picked 
some high-placed character.

It provides /huge/ increases in speed in big databases so it can be worth 
doing, but it may not make a big difference in your case.

> Will this work without using the BETWEEN statement you describe above ?

In SQLite

a BETWEEN b AND c

is exactly equivalent to

a >= b AND a <= c

In fact I believe that the substitution is made at the parsing level rather 
than involving low-level changes to planning.  So you can just consider it two 
separate restrictions.

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

Reply via email to