I need to store tree information in a database. For each node in the tree, there are multiple rows that need to be inserted into a couple of database tables.
I'm under the impression that calling a recursive function that iterates through the tree to insert the appropriate rows for each node will be slow for trees with thousands of rows because there will be thousands of separate insert statements - is this correct ? If so, what are other solutions ? Thanks in advance.

