Performance Considerations
The following broadly characterizes the performance impact of recursive queries with
respect to execution time:
Using a recursive query shows a significant performance improvement over using temporary
tables with a stored procedures. In most cases, there is a highly significant improvement.
Using the WITH RECURSIVE clause has basically the same or equivalent performance as
using the RECURSIVE VIEW.
In using a recursive query, it is important to put depth limits on the recursion to
prevent infinite recursion when there are cycles in the underlying data.