Originally Posted by Ian
really need to optimize again - will need to find a different method though - one where I know what is going on.....
the best method would be the fastest method, and that would be to do it from the MySQL command line via SSH; as no scripts from the webserver would execute the command, it would run much faster than if you where to run it through a script (as you're not using one system utility to access another, thus editing out the middle man).

This would be as easy as:
1. Login via SSH.
2. Login to MySQL with a user account who has access to the database you wish to edit (mysql -uuser -ppass)
3. Execute the command (replace db with your database that your tables are in): use db;
4. Execute the command (replace ubb7_ with your table prefix):
Code
OPTIMIZE TABLE `ubb7_ADDRESS_BOOK` , `ubb7_ADMIN_SEARCHES` , `ubb7_ANNOUNCEMENTS` , `ubb7_BANNED_EMAILS` , `ubb7_BANNED_HOSTS` , `ubb7_BANNED_USERS` , `ubb7_CACHE` , `ubb7_CACHED_PERMISSIONS` , `ubb7_CALENDAR_EVENTS` , `ubb7_CAPTCHA` , `ubb7_CATEGORIES` , `ubb7_CENSOR_LIST` , `ubb7_DISPLAY_NAMES` , `ubb7_fc_bans` , `ubb7_fc_config` , `ubb7_fc_config_chats` , `ubb7_fc_config_instances` , `ubb7_fc_config_values` , `ubb7_fc_connections` , `ubb7_fc_ignors` , `ubb7_fc_messages` , `ubb7_fc_rooms` , `ubb7_FILES` , `ubb7_FORUMS` , `ubb7_FORUM_LAST_VISIT` , `ubb7_FORUM_PERMISSIONS` , `ubb7_GRAEMLINS` , `ubb7_GROUPS` , `ubb7_IMPORT_MAP` , `ubb7_LANGUAGES` , `ubb7_MAILER` , `ubb7_MEMBER_SEARCHES` , `ubb7_MODERATORS` , `ubb7_MODERATOR_NOTIFICATIONS` , `ubb7_MODERATOR_PERMISSIONS` , `ubb7_ONLINE` , `ubb7_POINTER_DELETE` , `ubb7_POLL_DATA` , `ubb7_POLL_OPTIONS` , `ubb7_POLL_VOTES` , `ubb7_PORTAL_BOXES` , `ubb7_POSTS` , `ubb7_PRIVATE_MESSAGE_POSTS` , `ubb7_PRIVATE_MESSAGE_TOPICS` , `ubb7_PRIVATE_MESSAGE_USERS` , `ubb7_RATINGS` , `ubb7_REGISTRATION_FIELDS` , `ubb7_RESERVED_NAMES` , `ubb7_RSS_FEEDS` , `ubb7_SAVED_QUERIES` , `ubb7_SEARCH_AGENTS` , `ubb7_SEARCH_RESULTS` , `ubb7_SHOUT_BOX` , `ubb7_STYLES` , `ubb7_TOPICS` , `ubb7_TOPIC_VIEWS` , `ubb7_USERS` , `ubb7_USER_DATA` , `ubb7_USER_GROUPS` , `ubb7_USER_NOTES` , `ubb7_USER_PROFILE` , `ubb7_USER_TITLES` , `ubb7_VERSION` , `ubb7_WATCH_LISTS`;


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!