title: Recursive CTE and performance issue - recursion is too slow
body: <p>I have a tree structure table with a parent-child relationship. There's one root row, and total number of 13853 rows.</p>
  
  <p>On one form I select a node in the hierarchy and all beneath it, are considered selected. Some users select top root node, so all 13852 rows are considered selected. </p>
  
  <p>Now, when I run the recursive query to fetch all selected nodes, it's just killing the database. I wonder, is it possible to apply paging / limit function to recursive CTE?</p>