On 1/17/15, Stephan Buchert <[email protected]> wrote: > If selecting rows according to a date/timestamp is ever needed, numeric > time stamps are clearly advantageous, e.g. > > SELECT * FROM data WHERE t BETWEEN julianday(tbegstr) AND > julianday(tendstr); > > is much more efficient than > > SELECT * FROM data WHERE julianday(tstr) BETWEEN julianday(tbegstr) AND > julianday(tendstr); >
This is also fast: SELECT * FROM data WHERE tstr BETWEEN tbegstr AND tendstr; And it works just as well if dates are in the ISO8601 format. -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

