Created
June 20, 2019 12:17
-
-
Save PhilETaylor/630aa27c8e72fb877e033cb6fccda53b to your computer and use it in GitHub Desktop.
myJoomla Speedup SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE bf_files AS NEWTABLE | |
INNER JOIN ( | |
SELECT | |
bf_files_last.filewithpath, bf_files_last.suspectcontent, bf_files_last.falsepositive, bf_files_last.encrypted FROM bf_files_last | |
LEFT JOIN | |
bf_files ON bf_files_last.filewithpath = bf_files.filewithpath | |
WHERE | |
bf_files_last.currenthash = bf_files.currenthash | |
AND | |
bf_files_last.filemtime = bf_files.filemtime | |
AND | |
bf_files_last.fileperms = bf_files.fileperms | |
AND | |
bf_files_last.filewithpath = bf_files.filewithpath | |
) AS | |
OLDTABLE | |
ON | |
NEWTABLE.filewithpath = OLDTABLE.filewithpath | |
SET | |
NEWTABLE.filewithpath = OLDTABLE.filewithpath, | |
NEWTABLE.suspectcontent = OLDTABLE.suspectcontent, | |
NEWTABLE.falsepositive = OLDTABLE.falsepositive, | |
NEWTABLE.encrypted = OLDTABLE.encrypted, | |
NEWTABLE.queued = 0 | |
WHERE | |
OLDTABLE.suspectcontent != 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment