mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24448
[Bug 1427885] [NEW] Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
Public bug reported:
Originally, we just had each artefact store its parent ID. This is slow
because it requires running multiple queries to find all the descendants
of a node.
Then, we added a "path" element to each artefact. This is better, but
you can't get a performance improvement by indexing the column, because
most of the queries rely on the "LIKE" operator. (See
https://bugs.launchpad.net/mahara/+bug/1423700 )
So if we want to squeeze more performance out of this, I think the one
remaining thing to look into is the "nested set" technique. This
technique results in very fast searches for descendants, with the cost
of somewhat slower writes. http://mikehillyer.com/articles/managing-
hierarchical-data-in-mysql/
There are even existing PHP libraries for using the technique, such as
this one: http://www.sideralis.org/baobab/
** Affects: mahara
Importance: Wishlist
Status: Triaged
** Tags: performance
** Changed in: mahara
Importance: Undecided => Wishlist
** Changed in: mahara
Milestone: None => 15.10.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1427885
Title:
Change "artefact.path" column to use the "nested set" technique for
managing hierarchical data
Status in Mahara ePortfolio:
Triaged
Bug description:
Originally, we just had each artefact store its parent ID. This is
slow because it requires running multiple queries to find all the
descendants of a node.
Then, we added a "path" element to each artefact. This is better, but
you can't get a performance improvement by indexing the column,
because most of the queries rely on the "LIKE" operator. (See
https://bugs.launchpad.net/mahara/+bug/1423700 )
So if we want to squeeze more performance out of this, I think the one
remaining thing to look into is the "nested set" technique. This
technique results in very fast searches for descendants, with the cost
of somewhat slower writes. http://mikehillyer.com/articles/managing-
hierarchical-data-in-mysql/
There are even existing PHP libraries for using the technique, such as
this one: http://www.sideralis.org/baobab/
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1427885/+subscriptions
Follow ups
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Kristina Hoeppner, 2019-03-14
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Kristina Hoeppner, 2018-08-30
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2018-03-08
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Peter Spicer, 2018-01-16
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2017-12-07
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2017-09-18
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Kristina Hoeppner, 2017-03-20
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2016-10-21
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2016-10-20
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Aaron Wells, 2016-04-28
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Aaron Wells, 2015-09-30
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2015-03-03
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Robert Lyon, 2015-03-03
-
[Bug 1427885] Re: Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Aaron Wells, 2015-03-03
-
[Bug 1427885] [NEW] Change "artefact.path" column to use the "nested set" technique for managing hierarchical data
From: Aaron Wells, 2015-03-03
References