It is a tiny bit more complex then just an SQL query, things like the forumcache need to be updated e.t.c. You may want to look at using the
vB_DataManager_Forum, though you will require a bit of knowledge in PHP & vBulletin to get it working correctly.
One thing I would say though is that 500 Subforms seems a bit excessive. My recommendation would be to wait for the stable release of 3.7, this features
Thread Prefixes. Using this you could drastically reduce the number subforums you have, if you want to.