I've been wondering about FindPagesWithCriteria... Does it use BFS (breadth-first search) or DFS (depth-first search)? Perhaps there is even a way to control this? Or maybe it uses neither?
FindPagesWithCriteria uses a few stored procedures (for ex. netPropertyPageSearch, netPropertyPageSearchString) to perform the search and is thus able to work on the complete set of pages at once.
In order to filter out only those pages under the specified node there is a helper table, tblTree, that contains all pageIds under anygiven parent page id.