Add lastmsgid limit on fetching backlog to SQLite
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 4 Mar 2017 21:09:14 +0000 (15:09 -0600)
committerShane Synan <digitalcircuit36939@gmail.com>
Sun, 5 Mar 2017 05:19:06 +0000 (23:19 -0600)
commitcbc57790069f3bc3e54c59e54cd3274abff536e6
tree8bed2527efb0c6e1d8a6b39fa1bcfa8e4b0c65c4
parent31c1e758654388b080ce1dee7065afa053efc1b8
Add lastmsgid limit on fetching backlog to SQLite

Copy lastmsgid fetch limit improvements from PostgreSQL to SQLite,
improving performance by not requiring scanning from the start of the
backlog table to the present.

This builds upon pull request #273, including the original intent of
improving performance for unread backlog fetching.  The original pull
request left out these lines when applying the PostgreSQL changes to
SQLite.

NOTE:  The client-side generating these invalid values should be
fixed in future commits.
src/core/SQL/SQLite/21/select_messagesNewerThan.sql
src/core/SQL/SQLite/21/select_messagesNewestK.sql