Sql optimise nested set final

Sql optimise nested set final