Most effective way of creating large amount of sub-forums

This is actually easy to do if you write a little Ruby script to update the PostgreSQL database directly.

It’s not necessary to use an API to do this “relatively straightforward” DB query scripting task using Ruby.