Please, optimize table structure of CleanTalk
-
Hello,
CleanTalk causes records in my DB slow log. I found, that Version: 6.41.1 has unoptimal /cleantalk-spam-protect/lib/Cleantalk/Common/Schema.php definitions.
For example table sessions has defined ‘__indexes’ => ‘PRIMARY KEY (
name
(40),id
(64))’ on two VARCHAR columns.The column “name” has in my installation only 2 values: ‘apbct_timestamp’, ‘apbct_urls’. None of these has length 40 characters. Both don’t need to be in column with charset utf8mb4, both much shorter ascii would work better. With caution the VARCHAR column type could be replaced with much faster ENUM.
The column “id” is IMHO also useless utf8mb4 and should be replaced with ascii.
The column “id” in my case has always length 64 characters, so VARCHAR should be replaced with CHAR.
Mayby you might improve the performance by changing the PRIMARY KEY column order. Probably you could improve it even more by changing the table structure to contain separate columns for timestamp, urls instead of column “value” which value meaing is stored in column “name”.
Could you please optimize your tables for faster websites?
Thank you,
Jan
- You must be logged in to reply to this topic.