Prefix search is not using an index
Bug #641198 reported by
Markus Korn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
Undecided
|
Markus Korn |
Bug Description
In the prefix search we are using a 'GLOB' sql-statement, this statement is not using the index and thus slow, some timings from me running the attached script:
* Database with ~50k events
* ~1% of these event have a subject with uri beginning with 'http://
* searching for all uris beginning with 'http://
* changing this query to some (x >= S AND x < T) statement reduces this time to ~0.002 sec
This is easy to implement (and test) for ascii chars, but as we support unicode esp. testing seems to be a bit tricky
Related branches
lp:~thekorn/zeitgeist/fix-641198-glob-use-index
- Seif Lotfy: Needs Information
-
Diff: 186 lines (+109/-8)3 files modified_zeitgeist/engine/sql.py (+37/-3)
test/engine-test.py (+67/-0)
test/sql-test.py (+5/-5)
Changed in zeitgeist: | |
status: | In Progress → Fix Committed |
Changed in zeitgeist: | |
milestone: | none → 0.6 |
Changed in zeitgeist: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
New version of the test script, run this script in lp:zeitgeist and in the attached branch, compare the last line of the output, the attached branch should be about 8-10% faster