Merge lp:~gmb/maas/fix-bug-1402237-1.7 into lp:maas/1.7
Proposed by
Graham Binns
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3332 |
Proposed branch: | lp:~gmb/maas/fix-bug-1402237-1.7 |
Merge into: | lp:maas/1.7 |
Diff against target: |
69 lines (+29/-8) 2 files modified
src/maasserver/views/nodes.py (+19/-8) src/maasserver/views/tests/test_nodes.py (+10/-0) |
To merge this branch: | bzr merge lp:~gmb/maas/fix-bug-1402237-1.7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+244986@code.launchpad.net |
Commit message
When fetching the non-debug events for a node, fetch the non-debug EventTypes first and then query the Event table using 'WHERE type_id IN <non-debug-
Previously, this query was the default Django-generated one, which did an INNER JOIN between Event and EventType. The new version is significantly faster, because there's an index missing on EventType.level which makes things slow at scale.
To post a comment you must log in.
Looks good. Couple of remarks below but nothing major.
[0]
Typo in the commit message: fecthing
[1]
Could you say in the commit message why we're using this trick instead of adding the index… and that the index is being added to trunk…?