Adjacency list vs. nested sets: MySQL | EXPLAIN EXTENDED
MySQL's nested sets model becomes competitive with adjacency lists for hierarchical queries when augmented with spatial R-Tree indexes on a bounding box field, allowing ancestor searches to complete in milliseconds rather than seconds—a performance advantage unavailable in other major database systems. The adjacency list remains faster for retrieving descendants to a certain depth, but requires custom recursive functions due to MySQL's lack of native recursion support, while nested sets updates are expensive and require table locking on MyISAM storage. The choice depends on update frequency: nested sets for read-heavy hierarchies with infrequent structural changes, adjacency lists for scenarios requiring frequent updates or continuous availability.