Artefactchooser query is slow

Reported by Richard Mansfield on 2011-10-12
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mahara
Low
Richard Mansfield

Bug Description

The query to fetch publishable artefacts for a block in the artefactchooser pieform element is slow, especially when the logged in user is in a lot of groups. This should be fixed because the query is run more frequently than it used to be (each time a textbox block is configured: see bug #736665).

Changed in mahara:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Richard Mansfield (richard-mansfield)

Reviewed: https://reviews.mahara.org/787
Committed: http://gitorious.org/mahara/mahara/commit/b49a1353cafdb635bac19fedfa88de63b5911dbb
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit b49a1353cafdb635bac19fedfa88de63b5911dbb
Author: Richard Mansfield <email address hidden>
Date: Tue Oct 11 13:49:30 2011 +1300

    Move admin public folder check into join condition (bug #872631)

    This seems to speed the query up, probably because there are usually
    not many files inside the admin public folder.

    Change-Id: I99a3eff6e4b52e4942f490331d6f2cc48a3a5b0d
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
milestone: none → 1.5.0
status: In Progress → Fix Committed
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/788
Committed: http://gitorious.org/mahara/mahara/commit/e825502db66d93ddcbd58123876e503c0c850ee0
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit e825502db66d93ddcbd58123876e503c0c850ee0
Author: Richard Mansfield <email address hidden>
Date: Wed Oct 12 14:03:53 2011 +1300

    Join on artefact table when fetching group artefacts (bug #872631)

    The artefact_access_role subselect can return a lot of rows when
    artefact_access_role is joined to group_member without also going
    through artefact.

    Also, the artefact_access_role & artefact_access_usr checks are
    moved in to subselects in the where clause, because that appears
    to make the query run faster.

    Change-Id: Ibba16c8db59213fe4861262a950d628937f5ec13
    Signed-off-by: Richard Mansfield <email address hidden>

Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjqY0AAoJECXBtiziiXdcrpMIAKO5qOyhN9AQn9fCr32yAEba
wyQwhMOm1wS5eB4Qa29Hbr3c0xgXcwgsIFHfe0SCL92Gt2W3UjB8klrrRYssj5iu
o7DlmKBJhXo7i/AC005KeMTQZfY7ZX/tI8Lqux3FjfhSpRhCPatLLPr/hZHTbB4X
XXI47L8e304a6AwmDgsa9UUejDIjOwmOF7fFTeul8OgS4zSg3GUDQ1tTMW3+7Sns
YNmS3iU2+e0Z1CQlg5BqKwHVzCByuPPXuotvUkBkcLP53k1gUOn3OnMODTfbbrvf
UOVYo510SEKrkMCi0B4rLQHg8Ck2cUc1wS4GhxCOMrAcYDokjgTM98AerGB2sGE=
=uHSn
-----END PGP SIGNATURE-----

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers