Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Biology Forums on September 07, 2019, 11:06:17 AM

Title: What activates "CHECK TABLE smf_messages EXTENDED"
Post by: Biology Forums on September 07, 2019, 11:06:17 AM
When this is running, suddenly, it slows everything down. What activates this query and what does it do?

Code: [Select]
CHECK TABLE smf_messages EXTENDED
Title: Re: What activates "CHECK TABLE smf_messages EXTENDED"
Post by: d3vcho(); on September 07, 2019, 11:40:58 AM
It basically checks that table for errors. As it's using the EXTENDED clause, it will run (much) slower since it performs the check for each key in each row. I can't recall where that sentence is called from. Maybe some maintenance task.
Title: Re: What activates "CHECK TABLE smf_messages EXTENDED"
Post by: Arantor on September 07, 2019, 11:49:59 AM
I cannot find the string 'check table' in any unmodified 1.1 or 2.0 installation.
Title: Re: What activates "CHECK TABLE smf_messages EXTENDED"
Post by: d3vcho(); on September 07, 2019, 11:51:04 AM
I couldn't either. Not even for 2.1.
Title: Re: What activates "CHECK TABLE smf_messages EXTENDED"
Post by: Biology Forums on September 07, 2019, 01:14:16 PM
Thanks Fellas. I'm embarrassed to tell you that it was an ancient script I made that ran every 30 minutes as a CRON job that check to see any corruptions in the table. I've turned it off, thank you for your help.