QueryTree: Document algorythm, explains performance