Bored? Looking to kill some time? Want to chat with other SMF users? Join us in IRC chat or Discord
Started by Something like that, February 02, 2009, 06:03:35 AM
Quote from: Phalloidium on February 02, 2009, 06:03:35 AMThis will make your statistic page load way faster. By default, SMF does not have several database indexes that drastically speed the statistics calculations up.If you know what a database index is, and how to add one, these are the ones you need to add: in the smf_members table, indexes on gender and totalTimeLoggedIn in the smf_topics table, indexes on numReplies and ID_MEMBER_STARTEDEnjoy.
Quote from: Antechinus on February 04, 2009, 07:53:26 PMHey this is awseome. I have no idea what I'm doing when it comes to adding indices but I can wreck things on my local before I go live.
Quote from: ApplianceJunk on February 04, 2009, 07:54:03 PMhttp://www.curvage.comInteresting niche.
Quote from: Antechinus on February 04, 2009, 07:58:02 PMHow is that site relevant?
Quote from: Antechinus on February 04, 2009, 08:05:06 PMI don't imagine it's too difficult. I just haven't had to do it before. Two questions though:1/ how does adding the extra indices to those tables affect scripts like upgrade.php?2/ does this also work with SMF 2?
Quote from: Phalloidium on February 04, 2009, 08:13:41 PM1. I can't say for certain, as those scripts could do anything, but it probably won't affect anything. Again, this is one reason why I'm not telling people how to do this -- they should have the knowledge to fix things on their own if the upgrade script causes trouble.2. Mostly likely. I haven't checked to see if the table and column names are the same, but something similar can be done. Look at the ORDER BY part of the queries and make sure there is an index on each columns it orders by.
Quote from: Phalloidium on February 04, 2009, 07:45:48 PMCan you please also add that members.realName should be converted to a varchar? It's a tinytext by default, and having any text or blob columns will always cause a filesort with a temporary table. There is more information on that here. It makes a big difference: my entire stats page loads in 0.060 seconds on a 30,000 member forum. So much better than the several whole seconds it used to take.
Quote<H> I had zero posts when I started posting
Quote from: Sarge on May 08, 2009, 02:31:50 AMGreat tip, Phalloidium
Quote from: Phalloidium on May 08, 2009, 08:40:43 PMQuote from: Sarge on May 08, 2009, 02:31:50 AMGreat tip, Phalloidium I'm a performance junkie