I removed the trail backslash and the 301 went away.
However this caused a weird side effect. Β Performance went to c**p.
Β
bbPress is load testing with a response time of 1300 ms
wpForo is now 37,000 ms. Β Β
wpForo WAS twice as fast, and now super slow.
Very strange side effect. Β *sigh*. Β Back to the drawing board.
Β
Put the backslash back and its still slow. Β So a coincidence.
Checked the slow query log for Mysql.
Suddenly its doing full table scans when reading threads and taking 40+ seconds. Ouch.
Β
Β User@Host: node5ZDc59hppy[node5ZDc59hppy] @ localhost []
# Thread_id: 99Β Schema: wwwnode5comΒ QC_hit: No
# Query_time: 40.561315Β Lock_time: 0.000166Β Rows_sent: 15Β Rows_examined: 700743
# Rows_affected: 0
# Full_scan: YesΒ Full_join: NoΒ Tmp_table: YesΒ Tmp_table_on_disk: Yes
# Filesort: YesΒ Filesort_on_disk: NoΒ Merge_passes: 0Β Priority_queue: Yes
#
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 SIMPLE wp_wpforo_posts ALL topicid_status NULL NULL NULL 233576 233576.00 100.00 100.00 Using temporary; Using filesort
# explain: 1 SIMPLE wp_wpforo_topics eq_ref PRIMARY PRIMARY 8 wwwnode5com.wp_wpforo_posts.topicid 1 1.00 100.00 100.00
#
SET timestamp=1493056604;
SELECT DISTINCT `wp_wpforo_posts`.*, `wp_wpforo_topics`.`private` FROM `wp_wpforo_posts`, `wp_wpforo_topics` WHERE `wp_wpforo_posts`.`topicid` = `wp_wpforo_topics`.`topicid`Β ORDER BY `wp_wpforo_posts`.`created` DESC LIMIT 15;
Temp tables and full scans. Β Not sure why. Hmmmmm.
Im so close to getting this to go really fast! ugh
Found the issue.
Β
The side bar RECENT POSTS widget is running this query:
SELECT DISTINCT `wp_wpforo_posts`.*, `wp_wpforo_topics`.`private` FROM `wp_wpforo_posts`, `wp_wpforo_topics` WHERE `wp_wpforo_posts`.`topicid` = `wp_wpforo_topics`.`topicid`Β ORDER BY `wp_wpforo_posts`.`created` DESC LIMIT 15;
Β
Β
Which causes a full table join, full table scan, and tmp tables in MYSQL. This type of unoptimized join just isnt going to work with big sites.Β
This really need to be re-engineered guys.
Β
Β
Without the sidebar widget im happy to announce I got wpForo running in less than 1 second when reading threads now.
Β
Β
Awwwww yeah, system load down, wpForo much much snappier!
Β
Need that sidebar widget optimized so I can put it back though Β π
Β