There is a option in vBulletin Admin Control Panel, i.e Maintenance > Repair/Optimize. How often shall I do it? I have about 110K posts, 205K members and about 20K daily unique visitors.
You certainly don't need to do it twice a day. Generally I do it if there are issues with a table (you pretty much have to do it at that point), or when I upgrade MySQL to a new major version (5.0.xx to 5.1.xx for example).