Make timestamp related queries faster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
Undecided
|
Markus Korn |
Bug Description
When grep'ing the source of `unity-
The attached script is timing the exactly same query which is used in `unity-
On lp:zeitgeist the find_events query returns the 6 events with most popular actors in ~0.22s
---> MostPopularActor: get len(ids)=6 using .find_eventids() in 0.224661s
By making the sql queries on the timestamp column conditional we will be able to reduce this time to
---> MostPopularActor: get len(ids)=6 using .find_eventids() in 0.069161s
Related branches
- Siegfried Gevatter: Approve
-
Diff: 16 lines (+5/-2)1 file modified_zeitgeist/engine/main.py (+5/-2)
Changed in zeitgeist: | |
status: | In Progress → Fix Committed |
Changed in zeitgeist: | |
milestone: | none → 0.6 |
Changed in zeitgeist: | |
status: | Fix Committed → Fix Released |
Once this fix has landed, I see even ways to improve time based queries if they are not using the cornercase "complete TimeRange", but we shouldn't take the second step before the first one...