Taxonomy Edge
Categories
Component ID
1090284
Component name
Taxonomy Edge
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
25715
Component created
Component changed
Component body
Taxonomy Edge optimizes tree functions for taxonomies. It provides a transitive closure table data model for easily managing hierarchical terms. It was created to avoid recursive functions when fetching all children, and to avoid the not-quite-so-scalable memory footprint of taxonomy_get_tree().
The provided patch contains overrides for the core module Taxonomy in regards to taxonomy_get_tree() and taxonomy_select_nodes().
Dependencies
- Taxonomy
Views
The included module Views Taxonomy Edge supports the "all" depth modifier, while optimizing tree queries. The core patch is not needed for the optimization of taxonomies in views.
Developer
Example of getting all children from tid:14
SELECT tid FROM {taxonomy_term_edge} WHERE parent = 14
Example of getting all nodes from tid:14 and below
D6:
SELECT DISTINCT n.nid
FROM node n
JOIN term_node tn ON tn.nid = n.nid
JOIN term_edge e ON e.tid = tn.tid
WHERE e.parent = 14
D7:
SELECT DISTINCT n.nid
FROM node n
JOIN taxonomy_index ti ON ti.nid = n.nid
JOIN taxonomy_term_edge e ON e.tid = ti.tid
WHERE e.parent = 14
