EBookSqlite: Improved performance and simplified code
authorTristan Van Berkom <tristanvb@openismus.com>
Sat, 30 Nov 2013 06:40:11 +0000 (15:40 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Sun, 1 Dec 2013 06:44:36 +0000 (15:44 +0900)
commitaf54b1560b5b196a8a90df18ff95da8a88efa97f
tree54b17c19eb7df3e28b1abd2de5720fb26f50612e
parent3051bfcf210f922aa1b3e132bcb754ac196adc46
EBookSqlite: Improved performance and simplified code

After much discussion on sqlite-users mailing list, I found
the real, correct technique for querying our multi attribute
values on the auxiliary tables.

  o Removed the crack query optimizer

  o Added the index to aux_table.uid (this is important
    to optimize contact inserts, as we have to delete
    all aux_table.uid entries in the case of a replace).

  o Drop the LEFT JOIN statements in favor of

    JOIN 'folder_id_email_list' AS 'email_list' ON +email_list.uid = summary.uid

    This does not create exponentially huge data sets because of the ON
    statement, the '+' ensures that email_list.uid is ineligable for
    indexing, since we want to use email_list.value indexes later on.
addressbook/libedata-book/e-book-sqlite.c