Thread: Miscellaneous Hacks - Yet Another Awards System
View Single Post
  #298  
Old 10-01-2008, 10:51 AM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by liwo View Post
That means that there are some indexes missing for a table that is used in a join. I had a quick look at the tables and think I found the missing indexes.

So please do a backup of your database and run the following MySQL querys (adding a table prefix as necessary):
Code:
ALTER TABLE `award_user` ADD INDEX `award_id` ( `award_id` )
Code:
ALTER TABLE `award_user` ADD INDEX `userid` ( `userid` )
These two statements create the probably missing indexes.
Code:
OPTIMIZE TABLE `award_user`
This statement actually fills the newly created indexes with the necessary data.

After doing this, check if the problem persists. If I guessed right it doesn't.

Thanks bro!
Now it's much better!
But some indexes are still missing:

Code:
[--] Up for: 6h 1m 4s (2M q [112.642 qps], 106K conn, TX: 3B, RX: 552M)
[--] Reads / Writes: 82% / 18%
[--] Total buffers: 602.0M global + 5.7M per thread (250 max threads)
[OK] Maximum possible memory usage: 2.0G (49% of installed RAM)
[OK] Slow queries: 0% (0/2M)
[OK] Highest usage of available connections: 9% (24/250)
[OK] Key buffer size / total MyISAM indexes: 64.0M/175.9M
[OK] Key buffer hit rate: 100.0% (118M cached / 46K reads)
[OK] Query cache efficiency: 66.6% (1M cached / 2M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (103 temp sorts / 140K sorts)
[!!] Joins performed without indexes: 132
[OK] Temporary tables created on disk: 7% (3K on disk / 49K total)
[OK] Thread cache hit rate: 99% (24 created / 106K connections)
[OK] Table cache hit rate: 84% (347 open / 413 opened)
[OK] Open file limit used: 5% (539/10K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01198 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete