core: Add SQLite backlog idx: bufferid, messageid
authorSven Anderson <sven@redhat.com>
Fri, 22 Sep 2017 21:10:51 +0000 (16:10 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 21 Dec 2017 13:12:11 +0000 (14:12 +0100)
commit0167e8a247e88c7546543a47f103b2e39aaea2f9
tree8ce2ebb54231e735a72783bc2af27a2f28985d20
parent310218c3d7be363ceeba646d11d007abae2d478b
core: Add SQLite backlog idx: bufferid, messageid

Connecting to the core with a big sqlite storage (>500MB) can become
extremely slow or even time out.  Adding an index over the tuples
(bufferid, messageid) speeds up the connection significantly, because
at connection time a lot of queries over these two values are
processed.

Modified by @digitalcircuit from original commit to add a new schema
upgrade.

Closes GH-313 and GH-244.
src/core/SQL/SQLite/setup_110_backlog_idx3.sql [new file with mode: 0644]
src/core/SQL/SQLite/version/26/upgrade_000_create_buffer_idx.sql [new file with mode: 0644]
src/core/sql.qrc