Improve FTS performance, fixes #750 (#752)
The previous implementation tried to use the CONFLICT_IGNORE policy when inserting new ngrams and was falling back to a query in case it failed to find the id of the exiting ngram. This was very slow because it meant an expensive query for every ngram to insert. The new solution goes over the existing ngrams and only inserts the ones which don't exist in the database. Similarily the ngram relations table is not cleared for the particular task, instead the existing ngrams are loaded and only new relations are inserted and obsolete relations are removed.
Loading
Please register or sign in to comment