Profile My Little Forum - some suggestions (General)

by danielb987, Monday, March 20, 2017, 18:27 (214 days ago) @ Milo

I think, the spam-column (and the user_id) should be an indexed column. Can you add this index to your database and run the analysis again?

ALTER TABLE `mlf2_entries` ADD INDEX(`spam`);
ALTER TABLE `mlf2_entries` ADD INDEX(`user_id`);

-

That was a huge improvement of two of the queries!

-

includes/main.inc.php, line 344:

SELECT COUNT(*) FROM mlf2_entries WHERE spam = 1

This query went from 500 millisecond to 0,5 milliseconds!

----

includes/main.inc.php, line 336:

SELECT COUNT(*) FROM mlf2_entries WHERE pid = 0 AND spam = 0

This query went from 600 milliseconds to 150 milliseconds!

----

Before the improvement, the top five queries took about 3,2 seconds in total. After the improvement, the top five queries took about 2,2 seconds in total.

Best regards,
Daniel


Complete thread:

 RSS Feed of thread

powered by my little forum