Hello all,

I'm running into what seems like an abnormally large
performance drop on on some FTS queries that use
matchinfo when compared to those that don't.

I created an FTS table using the following:

    CREATE VIRTUAL TABLE test
    USING FTS4(rowid, content);

and then filled it with ~2 million docs of ~10 tokens
each which resulted in a file of around 275 MB. After
running "optimize" on the table I issued a query with
3 terms like so:

    SELECT length(content) FROM test
    WHERE MATCH "w1 OR w2 OR w3"

which returned ~164,000 rows in 1.1 seconds. However,
if I throw in a call to matchinfo:

    SELECT length(matchinfo(test, 'x')) FROM test
    WHERE MATCH "w1 OR w2 OR w3"

the query takes 7.5 minutes. It seems FTS is getting
stuck calculating the 2nd and 3rd part of the "x"
matchinfo data ("hits all rows" and "docs with hits")
but it's not clear why this should take so long.
Any ideas on what might be causing the slowdown?

Thanks,
Iker

-- 
Iker Arizmendi
AT&T Labs - Research
Speech and Image Processing Lab
e: i...@research.att.com
w: http://research.att.com
p: 973-360-8516

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to