Improve SQL performance when deleting notifications

Bug #1358092 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Aaron Wells
1.10
Fix Released
Medium
Aaron Wells
1.9
Fix Released
Medium
Aaron Wells
15.04
Fix Released
Low
Aaron Wells
15.10
Fix Released
Low
Unassigned

Bug Description

Martin from Catalyst EU pointed out to me that the performance of the code in account/activity/index.json.php could be improved by stripping an unnecessary subquery from it.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3630

Revision history for this message
Aaron Wells (u-aaronw) wrote :

In 1.10 this particular optimization becomes much less important, because the old message inbox is no longer used unless the site disables the new "multi-recipient message" inbox.

Cheers,
Aaron

Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Aaron Wells (u-aaronw)
milestone: none → 1.9.3
Revision history for this message
Aaron Wells (u-aaronw) wrote :

... so I've move it to 1.9_STABLE instead: https://reviews.mahara.org/#/c/3654

The original bug reporter said that removing the nested subqueries from that UPDATE statement improved performance from taking > 1 minute to < 1 second, which is a drastic enough improvement (with no front-end change) that it'd be worth distributing on a stable release as a bug fix.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3654
Committed: http://gitorious.org/mahara/mahara/commit/5bc1339aec1427a2c3a9fd7fbd6ed31aad4a9468
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.9_STABLE

commit 5bc1339aec1427a2c3a9fd7fbd6ed31aad4a9468
Author: Martin Danko <email address hidden>
Date: Mon Aug 18 16:19:11 2014 +1200

SQL optimization

Bug 1358092

Change-Id: I688f290dd8904621a7d9328dfeed549eed8ab2aa

Changed in mahara:
milestone: none → 15.04.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/4144

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/4267

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4144
Committed: http://gitorious.org/mahara/mahara/commit/d1eadab822b8793f028d6a052294179d51a4cbd7
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit d1eadab822b8793f028d6a052294179d51a4cbd7
Author: Martin Danko <email address hidden>
Date: Mon Aug 18 16:19:11 2014 +1200

SQL optimization

Bug 1358092

Change-Id: I688f290dd8904621a7d9328dfeed549eed8ab2aa

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
tags: added: no-behat-needed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4267
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/a9b36c0f0b559457027027c034f4d8834d4581e5
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit a9b36c0f0b559457027027c034f4d8834d4581e5
Author: Robert Lyon <email address hidden>
Date: Thu Feb 12 10:59:50 2015 +1300

More SQL optimisation (Bug #1358092)

Allowing better sql when deleting of old notifications when
multirecipientnotification is enabled - as the code is similar to the
way account/activity/index.json.php used to be.

See patch 4144 for the change to account/activity/index.json.php

Change-Id: If7dce9527ec585b1968cbaff9028679ce7b93bcd
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4808

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4808
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/4c94f09c681943d5d2f090e71cf51df65e433270
Submitter: Son Nguyen (<email address hidden>)
Branch: 15.04_STABLE

commit 4c94f09c681943d5d2f090e71cf51df65e433270
Author: Robert Lyon <email address hidden>
Date: Thu Feb 12 10:59:50 2015 +1300

More SQL optimisation (Bug #1358092)

Allowing better sql when deleting of old notifications when
multirecipientnotification is enabled - as the code is similar to the
way account/activity/index.json.php used to be.

See patch 4144 for the change to account/activity/index.json.php

Change-Id: If7dce9527ec585b1968cbaff9028679ce7b93bcd
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit a9b36c0f0b559457027027c034f4d8834d4581e5)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.