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.