On 1/17/15, Stephan Buchert <stephanb...@gmail.com> 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 d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users