Do you have flexibility with your DB design? Have you considered using the nested set model for hierarchical data? This makes arbitrary nesting relationships a single query that performs well in SQL.
It took me a day to fully understand it and a day to fully implement it in my code but the payoffs were huge in terms for coding headaches and performance.
In reply to Re: Nesting prepared DBI handles
by bot403
in thread Nesting prepared DBI handles
by MattLG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |