Which approach is faster in MySQL ? Implementing a binary tree with MySQL and PHP(Codeigniter).
1) When only one query can update a lots of rows (Insertion of a node in tree using Nested Sets )
2) By using procedure and some if else logic and loops , reducing the number of rows-say, the number of rows to be updated in this approach is half than the previous one. (Implementing the tree with adjacency list - going upward till root and updating each root)
Earlier i had asked this question binary-tree-using-php-mysql But didnt get response . Thats why asked this question which somewhat what I have to know atleast.
Please Help Me !