Sql optimise nested set merged all

Sql optimise nested set merged all the nestedset related branches
need clarification on the where clause