How to select a lot of topics fast?

Regardless, it’s going to be mega-slow as doing this triggers probably a hundred database touching code paths. So if you are “recategorizing” 30k topics an entirely different (probably pure sql, bypassing active record) will be necessary.